ReSharper Web Help

This refactoring is available in: ReSharper Full Edition and ReSharper C# Edition

This refactoring serves to convert traditional C# properties with private backing fields to auto-properties that were introduced in C# 3.0.

To convert a property with backing field to auto-property
  1. Position the caret at the name of a property, or select it in File Structure:
    Convert Property to Auto-Property refactoring
  2. Choose ReSharper | Refactor | Convert | Property to Auto Property.
  3. The refactoring will be carried out without requiring you to specify any further options:
    Convert Property to Auto-Property refactoring

 Tip

Alternatively, you can use a context action with identical functionality. That is, to convert a property to auto-property, you simply need to press Alt+Enter at the name of the property and select To automatic property in the drop-down list.

See Also

Procedures