Saturday 10 May 2014

You can use GroupBy for that.
var groupedlist = list.GroupBy(c => c.Col1)
                      .Select((key, c) => new {Value = key, Count = c.Count()});

No comments:

Post a Comment