Eleminating Duplicate rows from Datatable.

Posted by vishalneeraj-24503 under LINQ category on | Points: 40 | Views : 1010
Here,We will use Distinct keyword to Eleminate Duplicate rows or filter Unique rows:-

For Example:-
var dt_unique_rows = dt_project.AsEnumerable().Distinct(DataRowComparer.Default);
DataTable dt_new_project_records = dt_unique_rows.CopyToDataTable();

Here,dt_project is a DataTable object,which contain duplicate rows.

Comments or Responses

Login to post response