ValueTuple<T1,T2,T3,T4,T5,T6,T7,TRest>.IStructuralEquatable.GetHashCode(IEqualityComparer) 方法

定義

使用指定的計算方法,計算目前 ValueTuple<T1,T2,T3,T4,T5,T6,T7,TRest> 執行個體的雜湊碼。Calculates the hash code for the current ValueTuple<T1,T2,T3,T4,T5,T6,T7,TRest> instance by using a specified computation method.

 virtual int System.Collections.IStructuralEquatable.GetHashCode(System::Collections::IEqualityComparer ^ comparer) = System::Collections::IStructuralEquatable::GetHashCode;
int IStructuralEquatable.GetHashCode (System.Collections.IEqualityComparer comparer);
abstract member System.Collections.IStructuralEquatable.GetHashCode : System.Collections.IEqualityComparer -> int
override this.System.Collections.IStructuralEquatable.GetHashCode : System.Collections.IEqualityComparer -> int
Function GetHashCode (comparer As IEqualityComparer) As Integer Implements IStructuralEquatable.GetHashCode

參數

comparer
IEqualityComparer

物件,其 GetHashCode(Object) 方法會計算目前 ValueTuple<T1,T2,T3,T4,T5,T6,T7,TRest> 執行個體的雜湊碼。An object whose GetHashCode(Object) method calculates the hash code of the current ValueTuple<T1,T2,T3,T4,T5,T6,T7,TRest> instance.

傳回

Int32

32 位元帶正負號的整數雜湊碼。A 32-bit signed integer hash code.

實作

備註

這個成員是明確介面實作。This member is an explicit interface implementation. 只有在 ValueTuple<T1,T2,T3,T4,T5,T6,T7,TRest> 實例轉換成介面時,才可以使用它 IStructuralEquatableIt can only be used when the ValueTuple<T1,T2,T3,T4,T5,T6,T7,TRest> instance is cast to an IStructuralEquatable interface. 方法只會包裝對 comparer 物件的實作為呼叫 IEqualityComparer.GetHashCodeThe method simply wraps a call to the comparer object's IEqualityComparer.GetHashCode implementation.

用來計算雜湊碼的演算法應該會針對視為相等的兩個物件傳回相同的雜湊碼 ValueTuple<T1,T2,T3,T4,T5,T6,T7,TRest>The algorithm used to compute the hash code should return the same hash code for two ValueTuple<T1,T2,T3,T4,T5,T6,T7,TRest> objects that are considered to be equal.

適用於