首页| 行业标准| 论文文档| 电子资料| 图纸模型
购买积分 购买会员 激活码充值

您现在的位置是:团子下载站 > 多国语言处理 > AutomaticPropertiesDefaultValues Article_src.zip PropertyInfo[] props = o.GetType().GetPropert

AutomaticPropertiesDefaultValues Article_src.zip PropertyInfo[] props = o.GetType().GetPropert

资 源 简 介

AutomaticPropertiesDefaultValues Article_src.zip PropertyInfo[] props = o.GetType().GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static) for (int i = 0 i < props.Length i++) { PropertyInfo prop = props[i] if (prop.GetCustomAttributes(true).Length > 0) { object[] defaultValueAttribute = prop.GetCustomAttributes(typeof(DefaultValueAttribute), true) if (defaultValueAttribute != null) { DefaultValueAttribute dva = defaultValueAttribute[0] as DefaultValueAttribute if(dva != null) prop.SetValue(o, dva.Value, null) }
VIP VIP