摘要: 1.通过反射获取枚举字段时,第一个字段时系统带的字段,类型是Int, Name貌似是_value.需要过滤掉;fi.FieldType == typeof(T);或者 if (fi.IsSpecialName) continue;另外获取Name, Value, Description string name = fi.Name; object value = Convert.ToInt32(fi.GetRawConstantValue()); DescriptionAttribute[] descs =... 阅读全文
posted @ 2014-03-12 00:04 Jimmy wu 阅读(3820) 评论(0) 推荐(0) 编辑