How to: Apply Custom Attributes to Types or Type Members (Class Designer)

You can apply a custom attribute to a type or to a member of a type.

To apply a custom attribute to a type

  1. Click the type's shape on a class diagram.

  2. In the Properties window, next to the Custom Attributes property for the type, click the ellipsis (…) button. The Custom Attributes dialog box is displayed.

  3. In the Custom Attributes dialog box, type one or more custom attributes. Separate attributes on new lines, but do not enclose them in brackets. When you are finished, click OK.

    The custom attributes you entered are applied to the type.

To apply a custom attribute to a type member

  1. Click the member's name in its type's shape on a class diagram, or its row in the Class Details window.

  2. In the Properties window, locate the Custom Attributes property for the member.

  3. Type one or more custom attributes (one per line), and press Enter.

    The custom attributes you entered are applied to the type.

See Also

Other Resources

Designing Classes and Types (Class Designer)