How to: Apply Custom Attributes to Types or Type Members
You can apply a custom attribute to a type or to a member of a type. For more information about attributes, see Attributes (C# Programming Guide), Attributes Alphabetical Reference, or Attributes in Visual Basic.
To apply a custom attribute to a type
Click the type's shape on a class diagram.
In the Properties window, next to the Custom Attributes property for the type, click the ellipsis (…) button. The Attribute Editor dialog box is displayed.
In the Attribute Editor, 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
Click the member's name in its type's shape on a class diagram, or its row in the Class Details window.
In the Properties window, locate the Custom Attributes property for the member.
Type one or more custom attributes (one per line), and press Enter.
The custom attributes you entered are applied to the type.