
Saturday evening I was coding again on my scheduling app when something odd striked me. Visual Studio 2008 generated a very strange piece of code when I used the prop snippet. The result was the following:
public string Name { get; set; }
This looked odd to me at first, because I expected it to generate a private field with a property that exposed the field. However, with C# 3.0 you can now opt for automatically implemented properties. And that's what's visual studio is generating there. A neat little trick that can save you time when you have to implement some simple properties.
— Update: Robert posted a link on how these properties work within C# 3.0, Bart de Smet also wrote about this, but with a little more on what the compiler does for you: http://community.bartdesmet.net/blogs/bart/archive/2007/03/03/c-3-0-automatic-properties-explained.aspx