JsonObject.Add Method (String, JsonValue)
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Adds a key/value pair to the JSON CLR object type.
Namespace:  System.Json
Assembly:  System.Json (in System.Json.dll)
Syntax
'Declaration
Public Sub Add ( _
    key As String, _
    value As JsonValue _
)
public void Add(
    string key,
    JsonValue value
)
Parameters
- key
 Type: System.String
 The key for the element added.
- value
 Type: System.Json.JsonValue
 The JsonValue for the element added.
Implements
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.