How to compare 2 data tables and get only unmatched rows

Hi All,

I have a data table and iam using for each loop to check differnt conditions. One of the condition i will get out put as one more datatable how to compare this datatable with the one original datatable.


Hi @thima
Check this

dt3 = dt1.AsEnumerable().Except(dt2.AsEnumerable(),System.Data.DataRowComparer.Default).CopyToDataTable

dt3 contains only uncommon rows

1 Like

Thanks a lot

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.