Hi All,
My objective is,
- Compare 2 CSV files.
- Store similar records in similar.csv
- Store different records in different.csv
I am trying to do following things:
- Read 2 CSV files.
- Build 3 blank data tables for storing output and temp usage. DT1, DT2 and DTunion.
- Do sort and distinct values so that I dont compare same records again and again (Just for code efficiency).
- [Temporary step] Store both the csv file records in one single datatable DTunion. (kind of union set).
- Nested for each row and if condition inside to check if the record is same or not. if yes, âadd data rowâ to datatable DT1. [This step gives me clear list of similar records. So, this step is fine and need no changes.]
- For different records, I am simply removing distinct records from union set. [Union - Distinct = Different]. For this, Started generic For each on DT1.Rows and invoked a method called Remove on DTunion.Rows. This should ideally remove DT1.Rows (distinct rows) from DTunion.Rows (Union of rows). However, it is throwing error âDataRowCollection does not have a public instance method named âRemoveâ matching the parameter types, generic type arguments, and generic type constraints supplied to InvokeMethod âInvoke Methodâ.â
Please help with sample xaml or update my xaml.