Sorry but there is no code for this question… I hope thats ok.
So, I have a list of objects with two properties, DateTime and String.
As a matter of fact, DateTime is just date (insertDate), for example 2022-02-04T00:00:00+01:00.
String is of course some text, a lot of text 🙂
I have to compare the list with these two properties with another list of identical structure.
To be more clear, those are the data returned by the API, so I have to compare is there any differences between these two lists.
2
Answers
Do it like this (it will compare two lists based on element index , so
if your lists are unsorted you must sort them and then use these codes) :
You can use a CustomComparator:
Given your base class for both lists:
Define the custom comparer for it
Then you can use it as follows: