Coming from a vb background here, what is the variable scope in c#. For example I want to declare a variable in my class and have it available to the methods within that class.
How can I make sTest available to MyFunc? Is there a more C# orientated way of doing this?
Code:
public partial class _Default : System.Web.UI.Page
{
public string sTest = "";
public static bool MyFunc() {
response.write sTest;
}
}
How can I make sTest available to MyFunc? Is there a more C# orientated way of doing this?