Search notes:

System.Attribute (class)

Base class for custom attribute-classes.
Attributes are a feature of the Common Language Runtime which allow to annotate types, fields, methods and properties with keyword/value pairs in order to describe the program. For example, attributes allow to describe a method with more fine details than the crude public or private specifiers. The values of the attributes can be extracted using reflection.
These attributes are stored in the metadata of a .NET Framework file.
Each attribute class has positional and named parameters.
The set of positional attributes is defined by the sequence of the parameters of the attribute classes's puublic constructor(s).
The set of named attributes is defined by the class's non-static, public and read-write fields or properties.
An attribute can be applied to different language-elements (such as methods or fields etc.). The attribute System.AttributeTargets is used to specify which attribute can be applied to which element.

See also

Obsolete program elements can be marked as such with System.ObsoleteAttribute.
How an attribute might be used can be controlled with the System.AttributeUsageAttribute class
A PowerShell function that is defined with the System.Management.Automation.CmdletBindingAttribute attribute uses PowerShell cmdLet rather than script parameter binding.

Index