I have these two datatables and I want to get the difference between them. Here is an example:
Table1
-------------------------
ID | Name
---------------
I will try to do it on a column level rather than a DataTable.
IEnumerable id_table1 = table1.AsEnumerable().Select(val=> (int)val["ID"]);
IEnumerable id_table2 = table2.AsEnumerable().Select(val=> (int)val["ID"]);
IEnumerable id_notinTable1= id_table2.Except(id_table1);
Just adding a .Select() to your answer...