28 Şubat 2016 Pazar

Remove Duplicate Records in a DataTable

// create a dv from the source dt 
DataView dv = new DataView(dt); 
// set the output columns array of the destination dt 
string[] strColumns = {"NodeID", "Title", "Url"}; 
// true = yes, i need distinct values. 
dt = dv.ToTable(true, strColumns);