EnumExtensions ToDescription Method | Glimpse API Documentation |
Converts an Enum value to a string if it is annotated with a DescriptionAttribute.
Namespace: Glimpse.Core.ExtensionsAssembly: Glimpse.Core (in Glimpse.Core.dll) Version: 1.0.1.0 (1.0.1)
Syntax
Parameters
- enumeration
- Type: System Enum
The enumeration.
Return Value
The DescriptionAttribute string of the corresponding Enum member, or an empty string if no DescriptionAttribute is present.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