| EnumExtensionGetAttributeTAttribute Method |
This method retrieves a specific attribute (TAttribute) associated
with the given enum value. It returns the attribute instance if
found, or null if the attribute is not present.
Namespace: QsInformatica.UtilsAssembly: QsInformatica.Utils (in QsInformatica.Utils.dll) Version: 27.1.0
Syntax public static TAttribute GetAttribute<TAttribute>(
this Enum value
)
where TAttribute : Attribute
<ExtensionAttribute>
Public Shared Function GetAttribute(Of TAttribute As Attribute) (
value As Enum
) As TAttribute
public:
[ExtensionAttribute]
generic<typename TAttribute>
where TAttribute : Attribute
static TAttribute GetAttribute(
Enum^ value
)
[<ExtensionAttribute>]
static member GetAttribute :
value : Enum -> 'TAttribute when 'TAttribute : Attribute
Parameters
- value Enum
[Missing <param name="value"/> documentation for "M:QsInformatica.Utils.EnumExtension.GetAttribute``1(System.Enum)"]
Type Parameters
- TAttribute
[Missing <typeparam name="TAttribute"/> documentation for "M:QsInformatica.Utils.EnumExtension.GetAttribute``1(System.Enum)"]
Return Value
TAttribute[Missing <returns> documentation for "M:QsInformatica.Utils.EnumExtension.GetAttribute``1(System.Enum)"]
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