king枚举帮助类
可以方便的实现枚举
枚举 public enum DeptType { [Description("科室1")] Professional = 1, [Description("科室2")] Administrative = 2, [Description("科室3")] Quality = 3, [Description("其他")] Other = 4 } 将枚举变为list var list=King.EnumHelper.EnumTools.EnumToList<DeptType>();
要获取描述
1、var status=1;
(DeptType)status.Description();
2、DeptType type
type.Description();