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

Definición

Determina si ICollection<T> contiene un valor específico.

 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

Objeto que se va a buscar en ICollection<T>.

Devoluciones

true si item se encuentra en la matriz ICollection<T>; en caso contrario, false.

Implementaciones

Comentarios

Las implementaciones pueden variar en la forma en que determinan la igualdad de objetos; por ejemplo, List<T> usa Default, mientras que SortedDictionary<TKey,TValue> permite al usuario especificar la IComparer<T> implementación que se usará para comparar claves.

Este método es una operación O(n), donde n es Count.

Se aplica a