public static ToDescription ( this value ) : string | ||
value | this | |
return | string |
public static string ToDescription(this Enum value)
{
var type = value.GetType();
var member = type.GetMember(value.ToString()).FirstOrDefault();
return member != null ? member.ToDescription() : value.ToString();
}