I have a custom class that implements this IComparable. This class is stored in a common list. Now I need to compare with lists to see which objects are in list A, but not in list B.
I thought the easiest way to do this is to iterate over list B and do A.contains ().
I don't know how to get it to use my CompareTo () (or another method that I can override so that I can tell if it contains a specific object or not). I could be wrong, but, as I understand it, it contains checks if the objects are actually the same (i.e. indicates the same place in memory).
Can anyone help me?
source
share