ValueTuple<T1,T2,T3,T4,T5,T6,T7>.IStructuralComparable.CompareTo 方法

定義

使用指定的比較子來比較目前的 ValueTuple<T1,T2,T3,T4,T5,T6,T7> 執行個體與指定的物件,並傳回一個整數,指出目前的物件在排序次序中,是位於指定物件之前、之後或相同的位置。

 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

提供自訂規則進行比較的物件。

傳回

帶正負號的整數,可指出此執行個體以及排序次序中 other 的相對位置,如下表所示。

描述
負整數 這個執行個體位於 other 之前。
這個執行個體和 other 的排序位置相同。
正整數 這個執行個體位於 other 之後。

實作

適用於