Remove duplicates from DataTable and custom IEqualityComparer<DataRow>
- by abatishchev
How have I to implement IEqualityComparer<DataRow> to remove duplicates rows from a DataTable with next structure:
ID primary key, col_1, col_2, col_3, col_4
The default comparer doesn't work because each row has it's own, unique primary key.
How to implement IEqualityComparer<DataRow> that will skip primary key and compare only…