ValueTuple<T1,T2>.IStructuralEquatable.Equals(Object, IEqualityComparer) ValueTuple<T1,T2>.IStructuralEquatable.Equals(Object, IEqualityComparer) ValueTuple<T1,T2>.IStructuralEquatable.Equals(Object, IEqualityComparer) Method


返回一个值,该值指示基于指定的比较方法,当前 ValueTuple<T1,T2> 实例是否与指定的对象相等。Returns a value that indicates whether the current ValueTuple<T1,T2> 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


Object Object Object

与该实例进行比较的对象。The object to compare with this instance.

IEqualityComparer IEqualityComparer 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 objects; otherwise, false.




此成员是显式接口成员的实现。This member is an explicit interface member implementation. 它只能在 ValueTuple<T1,T2> 实例被强制转换为 IStructuralEquatable 接口时使用。It can be used only when the ValueTuple<T1,T2> instance is cast to an IStructuralEquatable interface.

仅当other不是null, 并且它可以成功地强制转换为ValueTuple<T1,T2>其组件的类型与当前实例相同的类型时, 才会调用实现。IEqualityComparer.Equals(Object, Object)The IEqualityComparer.Equals(Object, Object) implementation is called only if other is not null, and if it can be successfully cast to a ValueTuple<T1,T2> whose components are of the same types as those of the current instance. 方法首先ValueTuple<T1,T2> Equals(Object, Object)传递要与实现进行比较的对象的值。Item1 IStructuralEquatable.Equals(Object, IEqualityComparer)The IStructuralEquatable.Equals(Object, IEqualityComparer) method first passes the Item1 values of the ValueTuple<T1,T2> objects to be compared to the Equals(Object, Object) implementation. 如果此方法调用返回true, 将再次调用方法并Item2传递两个ValueTuple<T1,T2>实例的值。If this method call returns true, the method is called again and passed the Item2 values of the two ValueTuple<T1,T2> instances.