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

정의

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

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

매개 변수

item
TKey

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

반환

항목이 ICollection<T>에 있으면 true이고, 그렇지 않으면 false입니다.

구현

설명

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

이 방법은 O(1) 작업에 설명 합니다.

적용 대상