Convert between auto property and full property
Applies to: Visual Studio
Visual Studio for Mac
Note
This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here
This refactoring applies to:
- C#
What: Convert between an auto-implemented property to a full property.
When: The logic of the property has changed.
Why: You can convert between an auto-implemented property to a full property manually, however this feature will automatically do the work for you.
Place your cursor on the property name.
Press Ctrl+. to trigger the Quick Actions and Refactorings menu.
Select from the following two options:
Select Convert to full property.
Select Use auto property.