标签:
public static String ToEnumName(this int? source, Type e) { if (!source.HasValue) throw new ArgumentException("enum转换title 需要值"); return Enum.Parse(e, source.Value.ToString()).ToString(); }
用法 1.ToEnumName(typeof(AssetEnum))
标签:
原文地址:http://www.cnblogs.com/hualiu0/p/4658469.html