标签:
public static void EditValue<T>(this IList<T> array, Func<T, bool> where, T newobjs) { Type t = typeof(T); if (array.Any(where)) { foreach (T item in array) { if (where(item)) { var allpro = t.GetProperties(); foreach (PropertyInfo pi in t.GetProperties()) { pi.SetValue(item, pi.GetValue(newobjs, null), null); Logger.Default.Info(pi.GetValue(item, null).ToString()); } } } } else { array.Add(newobjs); } }
标签:
原文地址:http://www.cnblogs.com/jizhongfong/p/4499938.html