ValueTuple<T1,T2>.IStructuralComparable.CompareTo メソッド

定義

指定した比較子を使用して、現在の ValueTuple<T1,T2> インスタンスを指定したオブジェクトと比較し、現在のオブジェクトが並べ替え順序で指定したオブジェクトの前、後、または同じ位置にあるかどうかを示す整数を返します。

 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に従います。

実装

適用対象