IReadOnlyDictionary(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 read-only dictionary contains an element that has the specified key.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- key
- Type: TKey
The key to locate.
Return Value
Type: System.Booleantrue if the read-only dictionary contains an element that has the specified key; otherwise, false.
| Exception | Condition |
|---|---|
| ArgumentNullException | key is Nothing. |
Implementations can vary in how they determine the equality of objects; for example, the class that implements IReadOnlyDictionary(Of TKey, TValue) might use the Comparer(Of T).Default property, or it might implement the IComparer(Of T) method.
Implementations can vary in whether they allow key to be Nothing.