Redigera

Dela via


IAlternateEqualityComparer<TAlternate,T>.GetHashCode(TAlternate) Method

Definition

Returns a hash code for the specified alternate instance.

public int GetHashCode (TAlternate alternate);
abstract member GetHashCode : 'Alternate -> int
Public Function GetHashCode (alternate As TAlternate) As Integer

Parameters

alternate
TAlternate

The instance of type TAlternate for which to get a hash code.

Returns

A hash code for the specified instance.

Remarks

This interface is intended to be implemented on a type that also implements IEqualityComparer<T>. The result of this method should return the same hash code as would invoking the GetHashCode(T) method on any T for which Equals(TAlternate, T) returns true.

Applies to