Convert to Property with Backing Field
Converts an auto-implemented property to a property with the private field and fully described accessors. This prepares the property for the extension.
This Refactoring is opposite to Convert to Auto-implemented Property.
Available when the caret is on a property declaration statement. The property should be auto-implemented.
Place the caret on a property declaration statement.
The blinking cursor shows the caret's position at which the Refactoring is available.
- Use the Ctrl + . or Ctrl + ~ shortcut to invoke the Code Actions Menu.
- Select Convert to Property with Backing Field from the menu.
After execution, the Refactoring adds the intermediate private variable along with the getter and setter bodies.