ValueTuple<T1>.IStructuralComparable.CompareTo(Object, IComparer) メソッド
定義
指定した比較子を使って現在の ValueTuple<T1> インスタンスと指定したオブジェクトを比較して、現在のオブジェクトが、並べ替え順序において、指定したオブジェクトの前後または同じ位置のいずれにあるかを示す整数を返します。Compares the current ValueTuple<T1> 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.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
現在のインスタンスと比較するオブジェクト。The object to compare with the current instance.
- comparer
- IComparer
比較用のカスタムの規則を提供するオブジェクト。An object that provides custom rules for comparison.
戻り値
並べ替え順序における、このインスタンスと other
の相対位置を示す符号付き整数値 (次の表を参照)。A signed integer that indicates the relative position of this instance and other
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 .
|