Take this code:
public int Foo {get;set;}
In contrast to this more complete hand-written code:
private int x;
public int X
{
get { return x; }
set { x = value; }
}
In the first example, does the compiler automatically create a private property foo?
I'm not sure if this convention I saw that has a lowercase private property disguised as publicly uppercase is just a convention, or if it really is part of the language / compiler, and you can either write it or let it be made for you.
source
share