List<Foo> fooList = new List<Foo>();
fooList.Add(new Foo(){
Id = 1,
Bar = 1,
Blah = 1
});
fooList.Add(new Foo(){
Id = 1,
Bar = 2,
Blah = 1
});
fooList.Add(new Foo(){
Id = 2,
Bar = 1,
Blah = 2
});
如果我fooList按属性对我的属性进行分组,则除每个组之外的Id所有属性都彼此相等。Bar我注意到有一个GroupMylambda 方法,但是有没有办法将列表分组Id,并使Bar属性成为Bar每个 id 的所有 s 的列表?
因为现在我每行都有很多冗余数据。如果您希望我详细说明问题,请告诉我。