| nbsp; PropertyInfo[] propertyInfos = obj.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance);
foreach (PropertyInfo pi in propertyInfos) { string v = nv.Get(pi.Name.ToLower()); if (v != null) { if (pi.PropertyType == typeof(string)) {
pi.SetValue(obj, v, null);
} else if (pi.PropertyType == typeof(int?)) { pi.SetValue(obj, int.Parse(v), null); }
上一页 [1] [2] [3] [4] [5] [6] [7] [8] 下一页 |