AttributeUsage Attribute |
System.AttributeUsageAttribute
Class
Defines the program elements to which a custom attribute can be applied. Its use is required when defining a custom attribute.
New( validOn )
Indicates the program elements to which a custom attribute can be applied. Possible values are All , Assembly , Class , Constructor , Delegate , Enum , Event , Field , Interface , Struct , Method , Module , Parameter , Property , and ReturnValue .
Indicates whether the attribute can be used more than once on a single program element. Its default value is False .
Indicates whether attribute is automatically inherited by derived classes and overridden members . Its default value is True .
Read-only. Indicates the program elements to which the attribute can be applied. Its value is set by the required validon parameter of the class constructor.
See Section 8.2 in Chapter 8 for more details and an example.