Dictionary(Of TKey, TValue).ValueCollection.ICollection(Of TValue).Contains Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Determines whether the ICollection(Of T) contains a specific value.
Assembly: mscorlib (in mscorlib.dll)
'Declaration Private Function Contains ( _ item As TValue _ ) As Boolean Implements ICollection(Of TValue).Contains
Parameters
- item
- Type: TValue
The object to locate in the ICollection(Of T).
Implements
ICollection(Of T).Contains(T)Implementations can vary in how they determine equality of objects; for example, List(Of T) uses Comparer(Of T).Default, whereas, Dictionary(Of TKey, TValue) allows the user to specify the IComparer(Of T) implementation to use for comparing keys.
This method is an O(n) operation, where n is Count.