摘要: listA =listB 时,不管listA 或者listB 修改了,2个都会同时修改,需要用克隆的方式 listA =clone(listB); public static List<T> Clone<T>(this List<T> list) where T : new() { List<T> 阅读全文
posted @ 2019-11-18 12:23 落风无痕 阅读(226) 评论(0) 推荐(0)
摘要: var List = newList.GroupBy(o => o.Type).Select(p => new { type = p.Key, avg = p.Average(o => o.Score) }).ToList(); 取平均的 lambda写法 阅读全文
posted @ 2019-11-18 12:21 落风无痕 阅读(155) 评论(0) 推荐(0)