Click or drag to resize
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.1.0.0 (5.1.0)
Syntax
public static T GetAttributeOfType<T>(
	this Enum enumVal
)
where T : Attribute

Parameters

enumVal
Type: SystemEnum
The enum value

Type Parameters

T
The type of the attribute you want to retrieve

Return Value

Type: T
The 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