2
Answers

compare 2 datatables using linq in c#

i want to compare 2 datatables in which it first check for primary key , and then check for another changes in row, below code works without primary key how can i use primary key in bellow code ?
 
DataTable Final = dt1.AsEnumerable().Except(dt2.AsEnumerable(), DataRowComparer.Default).CopyToDataTable();

Answers (2)