What is the difference between using Private Properties instead of Private Fields
private String MyValue { get; set; }
// instead of
private String _myValue;
public void DoSomething()
{
MyValue = "Test";
// Instead of
_myValue = "Test";
}
Is there any performance issue ? or just a naming convention ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…