if you want to create a backup storage for an automatically generated property:
public string MyProperty { get; set; }
To:
public string _myProperty; public string MyProperty { get { return _myProperty; } set { _myProperty = value; } }
Then there is no shortcut that does this in Visual Studio . Refactoring tools like Resharper and CodeRush offer this feature.
In Visual Studio, there is an Encapsulate field that works differently ctrl + r , e .
public string _myProperty;
To:
public string _myProperty; public string MyProperty { get { return _myProperty; } set { _myProperty = value; } }
jessehouwing
source share