It's simpler than that:
A a = new A();
int id = a.id;
a.id = 666;
The syntax you are talking of is called an
autoimplemented
or
automatic
property, and it's just a short form for:
private int _id;
public int id { get { return _id; } set { _id = value; }}
The compiler generates the
_id
backing field.
BTW: The standrad is to use and initial uppercase letter foe properties, so your code should really be:
class A
{
public int Id { get; set; }
}
...
A a = new A();
int id = a.Id;
a.Id = 666;
...