SortedDictionary<TKey,TValue>.ValueCollection.ICollection<TValue>.Contains 메서드

정의

지정된 값이 ICollection<T> 포함되어 있는지 여부를 확인합니다.

 virtual bool System.Collections.Generic.ICollection<TValue>.Contains(TValue item) = System::Collections::Generic::ICollection<TValue>::Contains;
bool ICollection<TValue>.Contains(TValue item);
abstract member System.Collections.Generic.ICollection<TValue>.Contains : 'Value -> bool
override this.System.Collections.Generic.ICollection<TValue>.Contains : 'Value -> bool
Function Contains (item As TValue) As Boolean Implements ICollection(Of TValue).Contains

매개 변수

item
TValue

에서 찾을 개체입니다 ICollection<T>.

반품

있으면 , 그렇지 않으면 .입니다.

구현

설명

구현은 개체의 같음을 결정하는 방법에 따라 달라질 수 있습니다. 예를 들어 List<T> 사용자가 키를 비교하는 데 사용할 구현을 Default 지정할 수 있도록 하는 반면SortedDictionary<TKey,TValue>, 사용 IComparer<T>

이 메서드는 O(n) 연산입니다. 여기서 nCount.

적용 대상