Posted on: 12/24/2013 4:54:28 AM | Views : 741

Hi,
I want to get maximum value from duplicate records present in a datatable using Linq. This is how i got the duplicate values from Datatable.
DataTable duplicates_Area = dt.AsEnumerable().GroupBy(dr => dr.Field<string>("Area")).Where(g => g.Count() > 1).SelectMany(g => g).ToList().CopyToDataTable();
For Eg: I have a datatable as below
ID          Name          Amount        Area
1            abc                10               XYZ
2          ...

Go to the complete details ...