by Ira
26. August 2008 17:58
In a recent situation I was trying to pull some aggregates out of a DataTable using LINQ. I needed to get the rows of the DataTable with a Distinct clause, but my aggregates would be on other columns of the row. The problem is that when you call LINQ's Distinct() extension method with no arguments, it uses the "default IEqualityComparer". This means that it will work if you use the Select() extension method, only returning the column you want the distinct on. Well that works great, unless yo...
[More]
9eddbcd7-7533-4d6b-abb7-b316e3077e5b|1|4.0
Tags: c#, linq
C# | LINQ