项目场景: 对数据处理经常用的就是LIST,但有时候想像sql 一样,进行sum分组求合 C# 代码 var newList = (from newlist in oldList group newlist by new { newlist.gonghao,newlist.username } into grp select new { grp.Key.gonghao, grp.Key.username, stdtm = grp.Sum(t=>t.stdtm)}).ToList();