Coding Custom Attributes
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, other than being required by Microsoft’s Common Language Specification, it provides a better way for identifying attributes in code. When applying attributes you can shorten the attribute name 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 taking advantage of a custom attribute. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access