What's the difference (Performance, memory...etc) between encapsulating a private member like this
private int age;
public int Age
{
get { return age; }
set { age = value; }
}
and define a property like this
public int Age
{
get ;
set ;
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…