简体   繁体   English

我在类,结构或接口成员声明中收到错误的无效令牌'{'

[英]i get error Invalid token '{' in class, struct, or interface member declaration

please help me regarding " Invalid token '{' in class, struct, or interface member declaration" error. 请提供有关“类,结构或接口成员声明中的无效令牌'{'的错误”错误的帮助。 i need to have class that contains get and set method for employee data 我需要具有包含员工数据的获取和设置方法的类

using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

/// <summary>
/// Summary description for HandleEmployeeData
/// </summary>
public class HandleEmployeeData
{
    private int oracle_id;
    private String firstname;

   public String getFirstname();
    {
    return firstname;
    }

    public int getOracleID();
    {
       return oracle_id;

    }

    /*public HandleEmployeeData()
    {
        //
        // TODO: Add constructor logic here
        //
    }*/

}

Remove semicolon after public String getFirstname(); public String getFirstname();之后删除分号public String getFirstname(); and public int getOracleID(); public int getOracleID();

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 令牌无效 &#39;;&#39; 在类,结构或接口成员声明中 - Invalid token ';' in class, struct, or interface member declaration 令牌无效 &#39;;&#39; 在类struct或接口成员声明中 - invalid token ';' in class struct or interface member declaration 类、结构或接口成员声明中的无效标记“}” - Invalid token '}' in class, struct, or interface member declaration 类、结构或接口成员声明中的无效标记“)”和“{” - Invalid token ')' and '{' in class, struct, or interface member declaration 类,结构或接口成员声明中的令牌&#39;=&#39;无效 - Invalid Token '=' in class,struct or interface member declaration 类、结构或接口成员声明中的无效标记 - Invalid token in class, struct, or interface member declaration 错误:类,结构或接口成员声明中的无效令牌“ =” - Error: Invalid token '=' in class, struct, or interface member declaration 错误::类,结构或接口成员声明中的无效令牌&#39;=&#39; - Error ::Invalid token '=' in class, struct, or interface member declaration 尝试运行此 Unity-C# 脚本时出现错误(class、结构或接口成员声明中的令牌“无效”无效) - I get an error while trying to run this Unity-C# Script (Invalid token 'void' in class, struct, or interface member declaration) 类,结构或接口成员声明中的标记&#39;=&#39;无效,类,结构或接口成员声明中的无效标记&#39;(&#39; - Invalid token '=' in class, struct, or interface member declaration, Invalid token '(' in class, struct, or interface member declaration
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM