IStructuralEquatable.GetHashCode(IEqualityComparer) Method
Definition
Important
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.
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.