Friday, October 12, 2012

Eliminate duplicate rows in a Datatable

Assuming you have a datatable that has merged contents from different datatables and you want to eliminate the datatable with distinct rows, you can use the statement below.
Code:
dt.DefaultView.ToTable(true, new string[] { "id", "name" }); 
Cheers!

0 comments:

Post a Comment