ReadOnlyDictionary<TKey, TValue>.ContainsKey Method

Determines whether this dictionary contains the specified dictionary key.

Namespace:  Microsoft.SharePoint.Taxonomy.Generic
Assembly:  Microsoft.SharePoint.Taxonomy (in Microsoft.SharePoint.Taxonomy.dll)

Syntax

'Declaration
Public Function ContainsKey ( _
    key As TKey _
) As Boolean
'Usage
Dim instance As ReadOnlyDictionary
Dim key As TKey
Dim returnValue As Boolean

returnValue = instance.ContainsKey(key)
public bool ContainsKey(
    TKey key
)

Parameters

  • key
    Type: TKey

    The key to locate in the dictionary

Return Value

Type: System.Boolean
true if the current ReadOnlyDictionary object contains the key; otherwise, false

Exceptions

Exception Condition
ArgumentNullException

key is a a null reference (Nothing in Visual Basic) reference

See Also

Reference

ReadOnlyDictionary<TKey, TValue> Class

ReadOnlyDictionary<TKey, TValue> Members

Microsoft.SharePoint.Taxonomy.Generic Namespace