I have two DataTables: allRows
and rowsToDelete
. I want to delete rows from allRows
that rowsToDelete
contains. Both tables have the same structure (same columns and their datatypes), but I can't know exact column names and even their quantity.
object.Equals()
method recognizes rows from different tables as not equal so I can't use this approach.
From googling and reading StackOverflow I got an idea that probably it can be even done in one line, but I don't know how to build condition for this case:
allRows = allRows.AsEnumerable().Where(???).CopyToDataTable();