This Blog Has A New Home!

This blog has been moved to Articles already here will remain intact, while new content will only be added to the new location at

Thursday, March 12, 2009

C# 3.0 Automatic Properties

OK, so better later than never! Somehow I missed the automatic properties feature of C# 3.0, and just discovered it while I was reading up on something unrelated. It’s a nice feature of C# 3.0 that saves you a few key strokes hence enhances developer productivity as well as allows for more clear and concise code.

Using this new feature, instead of defining private variables and creating explicit getters and setters, you can create properties like this:

No comments:

New Articles On Software Rockstar