标签:des style blog class c code
var ent = new Ent(); foreach (var item in ent.GetType().GetProperties()) { var v = (DescriptionAttribute[])item.GetCustomAttributes(typeof(DescriptionAttribute), false); var descriptionName = v[0].Description; item.SetValue(ent,descriptionName+":1"); }
C# 获取属性字段上DescriptionAttribute的值,布布扣,bubuko.com
C# 获取属性字段上DescriptionAttribute的值
标签:des style blog class c code
原文地址:http://www.cnblogs.com/gossip/p/3738402.html