例如,我如何使用LINQ按GroupId对以下记录进行分组,并对每个组中的所有其他列求和?(从而将每组中的所有行合并为一个)varlist=newList(){newFoo(){GroupId=0,ValueA=10,ValueB=100},newFoo(){GroupId=1,ValueA=30,ValueB=700},newFoo(){GroupId=1,ValueA=40,ValueB=500},newFoo(){GroupId=2,ValueA=80,ValueB=300},newFoo(){GroupId=2,ValueA=20,ValueB=200},newFoo(){Gr