July 2015
Intermediate to advanced
1300 pages
87h 27m
English
A custom attribute is a class that inherits, directly or indirectly, from System.Attribute. When coding custom attributes, the class name should end with the Attribute word. This is not mandatory but, besides being required by Microsoft’s Common Language Specification (CLS), it provides a better way for identifying attributes in code. When applying attributes, you can shorten the attribute names by excluding the Attribute word. For example, imagine you have a Document class representing a simple text document. You might want to provide further information on the document, such as the author, reviewer, or last edit date. This information can be provided and stored in the assembly metadata using a custom attribute. Code ...