There is a contract between ``Equals(object)`` and ``GetHashCode()``: If two objects are equal according to the ``Equals(object)`` method, then calling ``GetHashCode()`` on each of them must yield the same result. If this is not the case, many collections won't handle class instances correctly.