自己写的enum转换的一个扩展,
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))
浙公网安备 33010602011771号