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 ?
Private properties allow you to abstract your internal data so that changes to the internal representation don’t need to affect other parts of your implementation, even in the same class. Private fields do not offer this advantage. With automatic properties in C# 3.0, I rarely see a need to implement fields directly — private or public.