var duplicates = result.Tables[0].AsEnumerable() .GroupBy(r => r["MOLId"])//Using Column Name .Where(gr => gr.Count() > 1) .Select(g => g.Key);
var qry = from p in tableName group p by p.columnNameinto grp where grp.Count() > 1 select grp; foreach (var product in qry) { MessageBox.Show("Duplicate Found!"); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)