Get the field description for the enumeration value
The description, or if it has none, the name
Enumeration:
public enum ExampleEnum { [EnumDescription("This is the first value")] FirstValue = 1, [EnumDescription("This is the second value")] SecondValue = 2 }Usage:
string desc = EnumDescriptorReader.GetEnumFieldDescription(ExampleEnum.FirstValue);
EnumDescriptorReader Class | CommandLine.OptParse Namespace