首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > 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
0.331474s