SortedDictionary<TKey,TValue>.KeyCollection.ICollection<TKey>.Contains Methode

Definitie

Bepaalt of de ICollection<T> opgegeven waarde bevat.

 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

Parameters

item
TKey

Het object dat moet worden gevonden in de ICollection<T>.

Retouren

trueals het item wordt gevonden in de ICollection<T>; anders . false

Implementeringen

Opmerkingen

Implementaties kunnen variƫren in hoe ze gelijkheid van objecten bepalen; Gebruikt bijvoorbeeld List<T>Default, terwijl SortedDictionary<TKey,TValue> de gebruiker de implementatie kan opgeven die moet worden gebruikt voor het IComparer<T> vergelijken van sleutels.

Deze methode is een O(1)-bewerking.

Van toepassing op