Hi
In a book I been reading they use a capital letter for public methods and properties. I know there are some other conventions like you put "_" in front of private variables. For me I don't like that way and like this way better but just wondering about stuff in the method.
So
public void MyMethod()
{
}
public string MyProperty {get; set;
}
and for private
private void myMethod()
{
}
But how about in the method?
like
public void MyMethod()
{
string MyVariable = null;
// or
string myVairable = null;
}
Also how about if you have sort of a global variable like
public class Test
{
private string bob;
public Test()
{
bob = null;
}
}
so should it be lowercase(since it is private)? Also on a side note would it better just make it a property but instead of a public property just have it private.