Hello, I need to compare two data table and in that, we have to compare the name coloumn
Example Dt1:
‘Name’ — ‘city’
Chethan — Bangalore
Sandy ----- Bangalore
Dt2:
‘Name’ ----- ‘city’
Guru ------- Hassan
Chethan ---- Bangalore
OutPut
OpDt:
‘Name’---- ‘City’
Chethan— Banglore
How to compare like this using LINQ
I use this LINQ
DataTable1.AsEnumerable.Intersect(DataTable2.AsEnumerable, system.Data.DataRowComparer.Default).CopyToDataTable
Can any one explain this system.Data.DataRowComparer.Default
and this .Intersect
Or if you have any other way to write this code please replay to this post
Chethan P
Happy Automation