Distinctly LINQ – Getting a Distinct List of Objects
- by David Totzke
Let’s say that you have a list of objects that contains duplicate items and you want to extract a subset of distinct items. This is pretty straight forward in the trivial case where the duplicate objects are considered the same such as in the following example: List<int> ages = new List<int> { 21, 46, 46, 55, 17, 21, 55, 55…