ValueTuple.IStructuralComparable.CompareTo(Object, IComparer) 方法

定义

将当前 ValueTuple 实例与指定的对象进行比较。

 virtual int System.Collections.IStructuralComparable.CompareTo(System::Object ^ other, System::Collections::IComparer ^ comparer) = System::Collections::IStructuralComparable::CompareTo;
int IStructuralComparable.CompareTo (object other, System.Collections.IComparer comparer);
abstract member System.Collections.IStructuralComparable.CompareTo : obj * System.Collections.IComparer -> int
override this.System.Collections.IStructuralComparable.CompareTo : obj * System.Collections.IComparer -> int
Function CompareTo (other As Object, comparer As IComparer) As Integer Implements IStructuralComparable.CompareTo

参数

other
Object

要与当前实例进行比较的对象。

comparer
IComparer

提供用于比较的自定义规则的对象。 忽略此参数。

返回

Int32

如果 otherValueTuple 实例,则返回 0;如果 othernull,则返回 1。

实现

例外

other 不是 ValueTuple 实例。

适用于