ValueTuple<T1,T2,T3>.Equals Method

Definition

返回一个值,该值指示当前 ValueTuple<T1,T2,T3> 实例是否与指定的对象相等。Returns a value that indicates whether the current ValueTuple<T1,T2,T3> instance is equal to a specified object.

Overloads

Equals(Object)

返回一个值,该值指示当前 ValueTuple<T1,T2,T3> 实例是否与指定的对象相等。Returns a value that indicates whether the current ValueTuple<T1,T2,T3> instance is equal to a specified object.

Equals(ValueTuple<T1,T2,T3>)

返回一个值,该值指示当前 ValueTuple<T1,T2,T3> 实例是否与指定的 ValueTuple<T1,T2,T3> 实例相等。Returns a value that indicates whether the current ValueTuple<T1,T2,T3> instance is equal to a specified ValueTuple<T1,T2,T3> instance.

Equals(Object)

返回一个值,该值指示当前 ValueTuple<T1,T2,T3> 实例是否与指定的对象相等。Returns a value that indicates whether the current ValueTuple<T1,T2,T3> instance is equal to a specified object.

public:
 override bool Equals(System::Object ^ obj);
public override bool Equals (object obj);
override this.Equals : obj -> bool
Public Overrides Function Equals (obj As Object) As Boolean

Parameters

obj
Object

要与此实例比较的对象。The object to compare with this instance.

Returns

Boolean

如果当前实例等于指定对象,则为 true;否则为 falsetrue if the current instance is equal to the specified object; otherwise, false.

Remarks

在下列条件下,obj 参数被视为等于当前实例:The obj argument is considered to be equal to the current instance under the following conditions:

  • 它是 ValueTuple<T1,T2,T3> 值类型。It is a ValueTuple<T1,T2,T3> value type.

  • 其组件的类型与当前实例的组件相同。Its components are of the same types as those of the current instance.

  • 其组件等于当前实例的组件。Its components are equal to those of the current instance. 相等性取决于每个组件的默认相等比较器。Equality is determined by the default equality comparer for each component.

Equals(ValueTuple<T1,T2,T3>)

返回一个值,该值指示当前 ValueTuple<T1,T2,T3> 实例是否与指定的 ValueTuple<T1,T2,T3> 实例相等。Returns a value that indicates whether the current ValueTuple<T1,T2,T3> instance is equal to a specified ValueTuple<T1,T2,T3> instance.

public:
 virtual bool Equals(ValueTuple<T1, T2, T3> other);
public bool Equals ((T1,T2,T3) other);
override this.Equals : ValueTuple<'T1, 'T2, 'T3> -> bool
Public Function Equals (other As ValueTuple(Of T1, T2, T3)) As Boolean

Parameters

other
ValueTuple<T1,T2,T3>

要与此实例进行比较的值元组。The value tuple to compare with this instance.

Returns

Boolean

如果当前实例等于指定元组,则为 true;否则为 falsetrue if the current instance is equal to the specified tuple; otherwise, false.

Implements

Remarks

在下列条件下,other 参数被视为等于当前实例:The other argument is considered to be equal to the current instance under the following conditions:

  • 其组件的类型与当前实例的组件相同。Its components are of the same types as those of the current instance.

  • 其组件等于当前实例的组件。Its components are equal to those of the current instance. 相等性取决于每个组件的默认相等比较器。Equality is determined by the default equality comparer for each component.

Applies to