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

Definição

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

 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

Parâmetros

item
TValue

O objeto a localizar no ICollection<T>.

Devoluções

true se 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(n), onde n é Count.

Aplica-se a