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/

Comments

Popular posts from this blog

Convert XElement to DataTable

Enable mouse scroll-wheel in VB6

C# code to Check IE Proxy Settings