public static string GetEnumName(this T enumItem){ if (enumItem is Enum) return Enum.GetName(typeof(T), enumItem); else throw new InvalidCastException("It is not enum type.");}
posted by oh_csharp at 9:17 AM
Post a Comment << Home
View my complete profile
0 Comments:
Post a Comment
<< Home