The requested page is not available for the requested platform. You are viewing the content for Default platform.

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; }