ValueTuple.IStructuralEquatable.Equals(Object, IEqualityComparer) 方法

定義

傳回值,這個值會根據指定的比較方法,指出目前的 ValueTuple 執行個體是否與指定的物件相等。Returns a value that indicates whether the current ValueTuple instance is equal to a specified object based on a specified comparison method.

 virtual bool System.Collections.IStructuralEquatable.Equals(System::Object ^ other, System::Collections::IEqualityComparer ^ comparer) = System::Collections::IStructuralEquatable::Equals;
bool IStructuralEquatable.Equals (object other, System.Collections.IEqualityComparer comparer);
Function Equals (other As Object, comparer As IEqualityComparer) As Boolean Implements IStructuralEquatable.Equals

參數

other
Object

與這個執行個體相互比較的物件。The object to compare with this instance.

comparer
IEqualityComparer

物件,定義要用來評估這兩個物件是否相等的方法。An object that defines the method to use to evaluate whether the two objects are equal.

傳回

如果目前的執行個體和指定的物件相等,則為 true,否則為 falsetrue if the current instance is equal to the specified object; otherwise, false.

實作

備註

這個成員是明確介面實作。This member is an explicit interface implementation. 只有當 ValueTuplet > 實例轉換成 IStructuralEquatable 介面時,才可以使用它。It can only be used when the ValueTuplet> instance is cast to an IStructuralEquatable interface. 只有在 other 不是 null,以及可以成功轉換成 ValueTuple 物件時,才會呼叫 IEqualityComparer.Equals 的執行。The IEqualityComparer.Equals implementation is called only if other is not null, and if it can be successfully cast to a ValueTuple object.

適用於

另請參閱