ContainsKey Method

ReadOnlyDictionary(Of TKey, TValue).ContainsKey Method

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

Determines whether the dictionary contains an element with the specified key.

Namespace:  System.Collections.ObjectModel
Assembly:  mscorlib (in mscorlib.dll)

'Declaration
Public Function ContainsKey ( _
	key As TKey _
) As Boolean

Parameters

key
Type: TKey
The key to locate in the dictionary.

Return Value

Type: System.Boolean
true if the dictionary contains an element with the specified key; otherwise, false.

Implements

IDictionary(Of TKey, TValue).ContainsKey(TKey)
IReadOnlyDictionary(Of TKey, TValue).ContainsKey(TKey)

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft