This documentation is archived and is not being maintained.

Adding a Property to a C# Class

Visual Studio .NET 2003

You can add a property to a C# class using a code wizard in Class View only. Adding a property using the C# Property Wizard adds a property stub body to the class's .cs file, which you can then edit.

To add a property to a C# class

  1. In Class View, right-click the class name.

    If necessary, expand the nodes that expose the class where you want to add the property.

  2. On the shortcut menu, click Add.
  3. On the submenu, click Add Property, and the C# Property Wizard appears. For details, see C# Property Wizard.

See Also

Visual C# Code Wizards | Properties | Visual C# Samples