SortedDictionary<TKey,TValue>.KeyCollection.ICollection<TKey>.Contains Método

Definição

Determina se o ICollection<T> contém o valor especificado.

 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

Parâmetros

item
TKey

O objeto a localizar no ICollection<T>.

Devoluções

true se o item for encontrado no ICollection<T>; caso contrário, false.

Implementações

Observações

As implementações podem variar na forma como determinam a igualdade dos objetos; por exemplo, List<T> usa , enquanto Default permite ao utilizador especificar a SortedDictionary<TKey,TValue> implementação a usar para comparar IComparer<T>chaves.

Este método é uma operação O(1).

Aplica-se a