Tuesday, 30 January 2007

Attributes

Attributes describe a type, method or property in a way that can be programmatically queried using Reflection. Common uses for Attributes include:

  • Specify which security privaledges a class requires
  • Specify security priviledges to refuse to reduce security risk
  • Declaring capabilities, such as supporting serialization
  • Describe the assembly by providing a title, description and copyright notice

Attributes all derieve from the System.Attribute class and are specified in C# using [] notation.

No comments: