DuplicateValues
Returns all distinct values in a collection.
- Use
IEnumerable.GroupBy()
to create groups for each distinct value in the enumerable. - Use
IEnumerable.Where()
to create select only the groups with a count greater than1
. - Use
IEnumerable.Select()
to return theKey
property of each group.