2
Reply

compare 2 datatables using linq in c#

Pops Fale

Pops Fale

Jun 21 2016 3:38 AM
406
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();

Upload Source Code  Select only zip and rar file.
Answers (2)