ExtensionMethodsGetAttributeOfTypeT Method |
Gets an attribute on an enum field value
Namespace:
SD.LLBLGen.Pro.Core
Assembly:
SD.LLBLGen.Pro.Core (in SD.LLBLGen.Pro.Core.dll) Version: 5.4.0.0 (5.4.0)
Syntax public static T GetAttributeOfType<T>(
this Enum enumVal
)
where T : Attribute
<ExtensionAttribute>
Public Shared Function GetAttributeOfType(Of T As Attribute) (
enumVal As Enum
) As T
Parameters
- enumVal
- Type: SystemEnum
The enum value
Type Parameters
- T
- The type of the attribute you want to retrieve
Return Value
Type:
TThe attribute of type T that exists on the enum value
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Enum. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also