自己写的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))

原文地址:https://www.cnblogs.com/hualiu0/p/4658469.html