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();
转载于:https://www.cnblogs.com/william-CuiCui0705/p/8193335.html
总结
- 上一篇: java-Calendar类
- 下一篇: wpf 用户自定义事件传参