C# automatic properties

C# 3.0 makes it very convenient to create properties that doesn't carry any functionalities besides returning value of attribute and assigning value to it. This new feature is called automatic properties.

 

NB! This blog is moved to gunnarpeipman.com

Click here to go to article

1 Comment

  • Why not just make the data member public with a capitalized name (ala property syntax)? Then if you wanted to add behavior, you can add formal property syntax and change the data member to be private with a lower case name. Same diff: you don't break clients that use property syntax.

Comments have been disabled for this content.