List<T>.IList.IndexOf(Object) 메서드
정의
virtual int System.Collections.IList.IndexOf(System::Object ^ item) = System::Collections::IList::IndexOf;
int IList.IndexOf (object item);
abstract member System.Collections.IList.IndexOf : obj -> int
override this.System.Collections.IList.IndexOf : obj -> int
Function IndexOf (item As Object) As Integer Implements IList.IndexOf
매개 변수
반환
목록에 있으면 item
의 인덱스이고, 그렇지 않으면 -1입니다.The index of item
if found in the list; otherwise, -1.
구현
예외
설명
이 메서드는 EqualityComparer<T>.Default 목록의 값 형식에 대 한 기본 같음 비교자를 사용 하 여 같은지 여부를 확인 합니다 T
.This method determines equality using the default equality comparer EqualityComparer<T>.Default for T
, the type of values in the list.
이 메서드는 선형 검색을 수행 합니다. 따라서이 메서드는 O (n) 작업입니다. 여기서 n 은 Count 입니다.This method performs a linear search; therefore, this method is an O(n) operation, where n is Count.