Mono Class Library: System.Collections.Generic.IEqualityComparer<T> Overview | MembersSystem.Collections.Generic.IEqualityComparer<T>.GetHashCode Method |
Returns a hash code for the specified object. [Edit]
|
- obj
- The object for which the hash code is to be returned. [Edit]
A hash code for the specified object. [Edit]
Type Reason ArgumentNullException The type of obj is a reference type and obj is null. [Edit]
To produce a hash function for the given object.
Note: A hash function is used to quickly generate a number (a hash code) corresponding to the value of an object. Hash functions are used with hashtables. A good hash function algorithm rarely generates hash codes that collide. For more information about hash functions, see The Art of Computer Programming , Vol. 3, by Donald E. Knuth.Operation
All implementations are required to ensure that if x.Equals(y) == true, then x.GetHashCode() equals y.GetHashCode(), for any x and y values for which these expressions are defined.
[Edit]
Namespace: System.Collections.Generic
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0