Get difference between two data-tables according to one column
问题 I have the following scenario: Table A that has 50 records and Table B that has 2 records. I need to define a new table, say TableDiff which should contain 48 records from Table A that doesn't exist in Table B My problem is that Table A and Table B are not identical but I have the field rowId which exists in both tables that I need to compare using it. 回答1: One way using Enumerable.Except and Enumerable.Join : var aIDs = TableA.AsEnumerable().Select(r => r.Field<int>("RowID")); var bIDs =