Duplicate rows of datatable

How to find duplicate rows of a datatable having two columns using linq query ?

Hi @Shashank6258

Check this

(From p in dt.Select() where( From q in dt.Select() where string.Join(",",q.ItemArray).Equals(string.Join(",",p.ItemArray)) Select q).ToArray.Count>1 Select p).ToArray.CopyToDataTable()

Thanks
Ashwin S

1 Like