Getting unique rows from Datatable.

Rajesh_Kumar
Posted by Rajesh_Kumar under C# category on | Points: 40 | Views : 1278
We use Distinct keyword to get only unique rows.

For Example:-
var unique_rows = dt_requisition.AsEnumerable().Distinct(DataRowComparer.Default);
DataTable dt_new_requisition = unique_rows.CopyToDataTable();


Here,dt_requisition is my DataTable object.

Comments or Responses

Login to post response