Gunnar Peipman's ASP.NET blog

ASP.NET, C#, SharePoint, SQL Server and general software development topics.

Sponsors

News

 
 
 
DZone MVB

Links

Social

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

Comments

George said:

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.

# August 14, 2009 5:14 PM