Click or drag to resize

ExtensionMethodsGetDescriptionT Method

Get the Description of an Enum value, if that enumeration value is marked by DescriptionAttribute

Namespace:  Hummingbird.TestFramework
Assembly:  Hummingbird.TestFramework (in Hummingbird.TestFramework.dll) Version: 1.2.0.0
Syntax
public static string GetDescription<T>(
	this T enumerationValue
)
where T : struct, new()

Parameters

enumerationValue
Type: T
value

Type Parameters

T
Type of the enumeration

Return Value

Type: String
The description of an Enum object.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . 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).
Examples
public enum Versions { [Description("1.0")] Version10 }
See Also