How would I specify the id field of an object in a list of objects as the disctinction?
Selections.Distinct();
How would I specify the id field of an object in a list of objects as the disctinction?
Selections.Distinct();
You can create an equality comparer by implementing the IEqualityComparer<TSource> interface. You then pass your ConcreteEqualityComparer to Distinct():
Selections.Distinct(new ConcreteEqualityComparer());
IEqualityComparer sample implementation. Shameless link to my answer for one similar SO question