Karthik Elumalai

Karthik Elumalai

  • NA
  • 5.4k
  • 1.9m

In Asp.net C# Is that possible to declare a variable as a pu

Jun 8 2016 5:10 AM
In Asp.net C# Is that possible to declare a variable as a public inside a method ?
Example:when i declare variable like below:
public void employee()
{
public int employeeNo;
}
Am getting the many compile time errors.
But When i google it,I got an information like , when a scope term is Public, used with Variables/Properties/Methods/Types then it will visible inside or outside of the project
So Am in bit confusion why it is giving error, It will be very helpful,if you clarify this.
Thanks

Answers (2)