I'm a bit confused.
I have the following code:
public class MyClass
{
public string DoSomething(string TheString)
{
int TheID;
string TheString = "";
}
}
This works fine; it compiles. However, why doesn't this work?
public class MyClass
{
public string DoSomething(string TheString)
{
private int TheID {get;set;}
private string TheString {get;set;}
}
}
I want to make these variables private. What do I need to change?