ContainsValue Method

SortedDictionary(Of TKey, TValue).ContainsValue Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Determines whether the SortedDictionary(Of TKey, TValue) contains an element with the specified value.

Namespace:  System.Collections.Generic
Assembly:  System (in System.dll)

'Declaration
Public Function ContainsValue ( _
	value As TValue _
) As Boolean

Parameters

value
Type: TValue
The value to locate in the SortedDictionary(Of TKey, TValue). The value can be Nothing for reference types.

Return Value

Type: System.Boolean
true if the SortedDictionary(Of TKey, TValue) contains an element with the specified value; otherwise, false.

This method determines equality using the default equality comparer EqualityComparer(Of T).Default for the value type TValue.

This method performs a linear search; therefore, the average execution time is proportional to the Count property. That is, this method is an O(n) operation, where n is Count.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft