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

定義

使用指定的比較子來比較目前的 ValueTuple<T1,T2,T3,T4,T5> 執行個體與指定的物件,並傳回一個整數,指出目前的物件在排序次序中,是位於指定物件之前、之後或相同的位置。Compares the current ValueTuple<T1,T2,T3,T4,T5> 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);
Function CompareTo (other As Object) As Integer Implements IComparable.CompareTo

參數

other
Object Object Object

要與目前執行個體比較的物件。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.

實作

適用於