ValueTuple<T1,T2,T3>.IComparable.CompareTo(Object) Method


使用指定的比较器比较当前 ValueTuple<T1,T2,T3> 实例与指定对象,并返回一个整数,该整数指示当前对象在排序顺序中的位置:是在指定对象之前、之后还是在与指定对象相同的位置。Compares the current ValueTuple<T1,T2,T3> instance to a specified object by using a specified comparer and returns an integer that indicates whether the current object is before, after, or in the same position as the specified object in the sort order.

 virtual int System.IComparable.CompareTo(System::Object ^ other) = IComparable::CompareTo;
int IComparable.CompareTo (object other);
abstract member System.IComparable.CompareTo : obj -> int
override this.System.IComparable.CompareTo : obj -> int
Function CompareTo (other As Object) As Integer Implements IComparable.CompareTo



要与当前实例比较的对象。The object to compare with the current instance.



一个带符号整数,指示此实例和 obj 在排序顺序中的相对位置,如下表所示。A signed integer that indicates the relative position of this instance and obj in the sort order, as shown in the following table.

Value 说明Description
负整数A negative integer 此实例位于 other 之前。This instance precedes other.
Zero 此实例在排序顺序中的位置与 other 相同。This instance and other have the same position in the sort order.
正整数A positive integer 此实例位于 other 之后。This instance follows other.


Applies to