SortedDictionary<TKey,TValue>.ValueCollection.ICollection<TValue>.Contains(TValue) Método
Definición
Determina si ICollection<T> contiene un valor específico.Determines whether the ICollection<T> contains a specified value.
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>.The object to locate in the ICollection<T>.
Devoluciones
true
si item
se encuentra en la matriz ICollection<T>; en caso contrario, false
.true
if item
is found in the ICollection<T>; otherwise, false
.
Implementaciones
Comentarios
Las implementaciones pueden variar en la forma en que determinan la igualdad de objetos; por ejemplo, List<T> utiliza Default , mientras que SortedDictionary<TKey,TValue> permite al usuario especificar la IComparer<T> implementación que se va a utilizar para comparar las claves.Implementations can vary in how they determine equality of objects; for example, List<T> uses Default, whereas SortedDictionary<TKey,TValue> allows the user to specify the IComparer<T> implementation to use for comparing keys.
Este método es una operación O ( n
), donde n
es Count .This method is an O(n
) operation, where n
is Count.