king枚举帮助类
可以方便的實(shí)現(xiàn)枚舉
枚舉 public enum DeptType{[Description("科室1")]Professional = 1,[Description("科室2")]Administrative = 2,[Description("科室3")]Quality = 3,[Description("其他")]Other = 4}將枚舉變?yōu)閘ist var list=King.EnumHelper.EnumTools.EnumToList<DeptType>();要獲取描述
1、var status=1;
(DeptType)status.Description();
2、DeptType type
type.Description();
?
轉(zhuǎn)載于:https://www.cnblogs.com/william-CuiCui0705/p/8193335.html
總結(jié)
- 上一篇: java-Calendar类
- 下一篇: wpf 用户自定义事件传参