Visual Studio 2008 Service Pack 1
Declaring the following automatic property
public string MyString { get; set; }
When you try to reference the MyString property it is null and on many occasions this is not what you want. This is also true of custom classes:
public MyClass MyObject { get; set; }
1) Allow initialization on an automatic property. Something like this:
public string MyString { get; set; } = String.Empty;
public MyClass MyObject { get; set; } = new MyClass();
2) Add an option from the right-click "Refactor menu" in Visual Studio to refactor an automatic property into a fully blown one.
public string MyString { get; set; } = String.Empty;
Becomes:
public string MyString
{
get { return _myString; }
set { _myString = value; }
}
This second part is particularly important if we can't initialize automatic properties as it would allow us to easily convert them to full blown ones.
3) Add the old property style snippet back in - or give a choice of automatic v.s. standard when using the the 'prop' snippet.