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를 비교하는 개체입니다.

반환

Int32

다음 표와 같이 현재 컬렉션 개체와 다른 개체 사이의 관계를 나타내는 정수입니다.

반환 값 Description
-1 현재 인스턴스가 other 앞에 옵니다.
0 현재 인스턴스와 other가 같습니다.
1 현재 인스턴스가 other 뒤에 옵니다.

구현

설명

이 멤버는 명시적 인터페이스 멤버 구현이며, Array 인스턴스가 IStructuralComparable 인터페이스로 캐스팅된 경우에만 사용할 수 있습니다.

적용 대상