EnumExtensions.GetAttributeOfType<T>(Enum) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets an attribute on an enum field value.
public static T GetAttributeOfType<T> (this Enum enumValue) where T : Attribute;
static member GetAttributeOfType : Enum -> 'T (requires 'T :> Attribute)
<Extension()>
Public Function GetAttributeOfType(Of T As Attribute) (enumValue As Enum) As T
Type Parameters
- T
The type of the attribute to retrieve.
Parameters
- enumValue
- Enum
The enum value.
Returns
T
The attribute of the specified type or null.