Can anyone please point out the cause of this error in the C# code of an ASP.Net application.
The build error is expecting a closing curly brace, although I have checked for all semicolons and brackets, but could not exactly pinpoint it. Any leads will be appreciated. Thanks!
Here is the code followed by the screen shot.
using System;
using System.Collections.Generic;
//using System.Linq;
//using System.Web;
using System.Data.SqlClient;
using System.Configuration;
namespace ANTrack
{
public class MyObjDataSource
{
public int iCount;
public string strName;
public void GetIncident(int IncidentID)
{
private SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString);
}
}
}

I think it has to do with the line:
You don’t want to put a
privatein front of that, it’s a variable in a method.