var duplicates = dt.AsEnumerable() .GroupBy(r => new { a = r[0], b = r[1] }) .Where(gr => gr.Count() > 1); lbMsg.Text = "Duplicate Record found for Rows: " + String.Join(", ", duplicates.Select(dupl => dupl.Key)); //End
This Blog is a programing portal, with tutorials and references relating to development subjects, including C#,Silverlight,WCF, Asp.Net,HTML, XML, CSS, JavaScript,Sql, Windows Administration.
Wednesday, January 25, 2012
Finding Duplicate Rows in DataTable using Linq
Subscribe to:
Post Comments (Atom)
update duplicate rows in data table......Send me pghante@gmail.com
ReplyDeleteosmaniye
ReplyDeleterize
sakarya
samsun
sivas
R72TAK
yurtdışı kargo
ReplyDeleteresimli magnet
instagram takipçi satın al
yurtdışı kargo
sms onay
dijital kartvizit
dijital kartvizit
https://nobetci-eczane.org/
4Z3
مكافحة حشرات D9A05CFLWo
ReplyDeleteنفخ المجاري بالاحساء TgyNk2HL8h
ReplyDelete