The first one will generate an implicit field your values will be written to and read from. These are called "auto implemented properties". Whereas in the second, you explicitly name the fields your property will write to and read from. From MSDN:
In C# 3.0 and later, auto-implemented properties make property-declaration more concise when no additional logic is required in the property accessors. They also enable client code to create objects. When you declare a property as shown in the following example, the compiler creates a private, anonymous backing field that can only be accessed through the property's get and set accessors.
Your implementation
public string a
{
get{return a;}
set{a=value;}
}
will cause a StackoverflowException
as you are calling a
recursively in the get
-accessor.
Change it to
private string a;
public string A{
get{ return a; }
set{ a = value; }
}