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

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...