ksd123
asked on
How to get Description value of a Enum in C#
I have following code and would like to know how to get Description  value of a Enum from Program class
Thanks in Advance
public enum Samplecolumns
{
[Description("one")]
col1=1,
[Description("two")]
col2=2,
[Description("three")]
col3=3
}
public class Sample
{
public Samplecolumns Column { get; set; }
}
public class Program
{
static void Main(string[] args)
{
//How to get Description of enum ?
}
}
Thanks in Advance
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Thank you
string description = Enumerations.GetEnumDescri