public static string GetCustomerIssueStatus(this HtmlHelper html, byte number)
{
return Enum.GetName(typeof(Shared.Enumerators.CustomerIssueStatus), number);
}
How could I create this extension method, to accept all enum types as parameter?
Join Stack Overflow to learn, share knowledge, and build your career.
Enum
? – Rohit Vats Dec 23 '13 at 19:46Enum
isn't supported as a generic type parameter. See Create Generic method constraining T to an Enum. – Dustin Kingen Dec 23 '13 at 19:48