Comparer<T>.Get Hash Code(T) Method
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
When overridden in a derived class, serves as a hash function for the specified object for hashing algorithms and data structures, such as a hash table.
public: abstract int GetHashCode(T obj);
public abstract int GetHashCode (T obj);
override this.GetHashCode : 'T -> int
Public MustOverride Function GetHashCode (obj As T) As Integer
The object for which to get a hash code.
A hash code for the specified object.
The type of
obj is a reference type and
Notes to Implementers
Implementations are required to ensure that if the Equals(T, T) method returns
true for two objects
y, then the value returned by the GetHashCode(T) method for
x must equal the value returned for