How to get C# Enum description from value?
How to get C# Enum description from value?
int value = 1;
string description = Enumerations.GetEnumDescription((MyEnum)value);
The default underlying data type for an enum in C# is an int, you can just cast it.
Read this: https://code.google.com/p/unconstrained-melody/
int value = 1;
string description = Enumerations.GetEnumDescription((MyEnum)value);
The default underlying data type for an enum in C# is an int, you can just cast it.
Read this: https://code.google.com/p/unconstrained-melody/
Comments
Post a Comment