Class EnumExtensions
Represents extension methods for enums
Methods
GetDescription(Enum)
Gets the description attribute from an enum
Declaration
public static string GetDescription(this Enum genericEnum)
Parameters
Type | Name | Description |
---|---|---|
System.Enum | genericEnum | The enum |
Returns
Type | Description |
---|---|
System.String | The description |
ListFromEnum<T>()
Generates a dictionary of enum values
Declaration
public static Dictionary<int, string> ListFromEnum<T>()
where T : Enum
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.Int32, System.String> | The dictionary of values |
Type Parameters
Name | Description |
---|---|
T | The type of enum |