Condividi tramite


JsonObject.ContainsKey Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Checks whether a key/value pair with a specified key exists in the JSON CLR object type.

Namespace:  System.Json
Assembly:  System.Json (in System.Json.dll)

Syntax

'Declaration
Public Overrides Function ContainsKey ( _
    key As String _
) As Boolean
public override bool ContainsKey(
    string key
)

Parameters

Return Value

Type: System.Boolean
true if the JSON CLR object contains the key; otherwise, false.

Implements

IDictionary<TKey, TValue>.ContainsKey(TKey)

Exceptions

Exception Condition
ArgumentNullException

key is nulla null reference (Nothing in Visual Basic).

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.