StringComparer.IComparer.Compare(Object, Object) 메서드

정의

두 개체를 비교하여 한 개체가 다른 개체보다 작거나, 같거나 또는 크다는 것을 나타내는 값을 반환합니다.

 virtual int System.Collections.IComparer.Compare(System::Object ^ x, System::Object ^ y) = System::Collections::IComparer::Compare;
int IComparer.Compare (object x, object y);
abstract member System.Collections.IComparer.Compare : obj * obj -> int
override this.System.Collections.IComparer.Compare : obj * obj -> int
Function Compare (x As Object, y As Object) As Integer Implements IComparer.Compare

매개 변수

x
Object

비교할 첫 번째 개체입니다.

y
Object

비교할 두 번째 개체입니다.

반환

Int32

xy의 상대 값을 나타내는 부호 있는 정수입니다.

구현

설명

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

반환 값에는 다음과 같은 의미가 있습니다.

의미
0보다 작음 xy보다 작은 경우
0 xy와 같습니다.
0보다 큼 xy보다 큰 경우

적용 대상