Επεξεργασία

Κοινή χρήση μέσω


IStructuralEquatable.GetHashCode(IEqualityComparer) Method

Definition

Returns a hash code for the current instance.

public:
 int GetHashCode(System::Collections::IEqualityComparer ^ comparer);
public int GetHashCode (System.Collections.IEqualityComparer comparer);
abstract member GetHashCode : System.Collections.IEqualityComparer -> int
Public Function GetHashCode (comparer As IEqualityComparer) As Integer

Parameters

comparer
IEqualityComparer

An object that computes the hash code of the current object.

Returns

The hash code for the current instance.

Remarks

Implement this method to return customized hash codes for collection objects that correspond to the customized comparison for structural equality provided by the Equals method.

Notes to Implementers

If the Equals(Object, IEqualityComparer) method returns true for two objects, the values returned by the GetHashCode(IEqualityComparer) method for the two objects must also be equal.

Applies to