封装了方法: public static class EnumOperate { public class BaseDescriptionAttribute : DescriptionAttribute { public BaseDescriptionAttribute(string descriptionCN) : base(descriptionCN) { } public BaseDescriptionAttribute(string descriptionCN, string descr…
代码: public class EnumberHelper { public static List<EnumberEntity> EnumToList<T>() { List<EnumberEntity> list = new List<EnumberEntity>(); foreach (var e in Enum.GetValues(typeof(T))) { EnumberEntity m = new EnumberEntity(); object…