简体   繁体   中英

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(); and public int getOracleID();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM