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)
Syntax
Private Function Contains ( _
key As Object _
) As Boolean Implements IDictionary.Contains
bool IDictionary.Contains(
Object key
)
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)
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | key is nullNothingnullptra null reference (Nothing in Visual Basic). |
Remarks
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.
Version Information
Windows Phone OS
Supported in: 8.1, 8.0