Object.Equals Method (System)

Switch View :
ScriptFree
.NET Framework Class Library
Object.Equals Method

Determines whether two Object instances are equal.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Overload List

  Name Description
Public method Equals(Object) Determines whether the specified Object is equal to the current Object.
Public method Static member Equals(Object, Object) Determines whether the specified object instances are considered equal.
Top
See Also

Reference

Community Content

692248CA-C597-49CF-B96F-600D39843454
Hash based collections and comparable interface (earlier versions of .NET)
To work properly in a hashable context, it is a basic rule that if two items are equal (or equivalent) then their hash values must be  the same. Therefore, one needs to implement an override of T.GetHashCode() as part of implementing any form of IEqualityComparer<> or IComparer<> interface. This should have been a requirement of the interfaces and the hashable collection types. This would seem to be an issue in the .NET framework design.