Tuesday, 30 July 2019

c# - How to pass generic enum parameter to method?

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?

No comments:

Post a Comment