score:15

Accepted answer
var distinctItems = myList.GroupBy(x => x.prop1).Select(y => y.First());

score:1

You can also use morelinq DistinctBy:

distinctItems = myList.DistinctBy(x => x.prop1).ToList();

or with several properties:

distinctItems = myList.DistinctBy(x=> new { x.prop1, x.prop2}).ToList();

Related Articles