You can use something like this:
var result = myInput.GroupBy(x => x.Total).Select(x => new { Total = x.Key, Name = x.First().Name });
Creates a new list of anonymous type, where each element has Toal and Name -property. However, it is believed that only the first element of the group, if more than one are combined together.
This solution has the advantage of retaining the Name properties. If you do not need this and you are only interested in Total , then Distinct , as suggested by others, is simpler.
source share