From MSDN
Types that implement IComparable must override Equals.Types that override Equals must also override GetHashCode; otherwise, Hashtable migh
There are two ways that objects in your code could be compared: Equals
and GetHashCode
For your object to be compared properly in ALL situations, when you override the Equals
method (used for some comparisons), you must also override GetHashCode
(used in the rest).
If you override one but not the other, depending on your code, you could get unexpected results.