AttributeUsage Attribute

   
AttributeUsage Attribute

Class

System.AttributeUsageAttribute

Applies to

Class

Description

Defines the program elements to which a custom attribute can be applied. Its use is required when defining a custom attribute.

Constructor

 New(   validOn   ) 
validOn ( System.AttributeTargets )

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 .

Properties

AllowMultiple (Boolean)

Indicates whether the attribute can be used more than once on a single program element. Its default value is False .

Inherited (Boolean)

Indicates whether attribute is automatically inherited by derived classes and overridden members . Its default value is True .

ValidOn ( AttributeTargets enumeration)

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.

Example

See Section 8.2 in Chapter 8 for more details and an example.

   


VB.Net Language in a Nutshell
VB.NET Language in a Nutshell
ISBN: B00006L54Q
EAN: N/A
Year: 2002
Pages: 503

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net