I read data from an XML file in a DataSet using C #, than I want to identify duplicate (completely identical) rows in this set. I tried this grouping and it works!
var d= from r1 in table.AsEnumerable() group r1 by new { t0 = r1[0], t1 = r1[1], t2 = r1[2], t3 = r1[3], t4 = r1[4], t5 = r1[5], t6 = r1[6], t7 = r1[7], t8 = r1[8], } into grp where grp.Count() > 1 select grp;
But the number of data columns can be different, so I can not apply static grouping in the query, as indicated above. Should I have generated a grouping array dynamically?
I do not want to delete duplicates, I just want to find them!
srcnaks
source share