-
From MS Docs article on
IEquatable<T>:If you implement
IEquatable<T>, you should also override the
base class implementations of
Equals(Object)and
GetHashCode()so that their behavior is
consistent with that of the
Equals(T)
method. If you do override
Equals(Object), your
overridden implementation is also
called in calls to the static
Equals(Object, Object)
method on your class. In addition,
you should overload theop_Equality
andop_Inequalityoperators.
This ensures that all tests for equality
return consistent results. -
No, operators do not use the Equals method. They must be overloaded separately to do so.