Array.IStructuralComparable.CompareTo(Object, IComparer) メソッド

定義

現在のコレクション オブジェクトが並べ替え順序で前にあるか、同じ位置にあるか、別のオブジェクトの後にあるかを判断します。

 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を比較するオブジェクト。

返品

次の表に示すように、現在のコレクション オブジェクトと他のコレクション オブジェクトの関係を示す整数。

戻り値 説明
1- 現在のインスタンスは、 otherの前にあります。
0 現在のインスタンスと other が等しい。
1 現在のインスタンスは otherに従います。

実装

注釈

このメンバーは、明示的なインターフェイス メンバーの実装です。 Array インスタンスがIStructuralComparable インターフェイスにキャストされている場合にのみ使用できます。

適用対象