Skip to main content

Convert to Auto-implemented Property (C#)

Converts an unimplemented property to an auto-implemented property.

Note

The code provider is only available for .NET framework 3.5 or higher.

#Availability

From the context menus or via shortcuts:

  • when the edit cursor or caret is on an unimplemented property declaration. The property should have a getter and a setter declared, but not implemented.

#Notes

#Example

public int TestProperty
{
    get
    {

    }
    set
    {

    }
}

Result:

public int TestProperty { get; set; }