IDictionary.Contains Method

ReadOnlyDictionary(Of TKey, TValue).IDictionary.Contains 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
Private Function Contains ( _
	key As Object _
) As Boolean Implements IDictionary.Contains

Parameters

key
Type: System.Object
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.Contains(Object)

ExceptionCondition
ArgumentNullException

key is Nothing.

This member is an explicit interface member implementation. It can be used only when the ReadOnlyDictionary(Of TKey, TValue) instance is cast to an IDictionary interface.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft