Modifier

Partager via


JsonObject.Add Method

Definition

Overloads

Add(KeyValuePair<String,JsonValue>)

Adds an item to the ICollection<T>.

Add(String, JsonValue)

Adds an element with the provided key and value to the IDictionary<TKey,TValue>.

Add(KeyValuePair<String,JsonValue>)

Adds an item to the ICollection<T>.

public:
 virtual void Add(System::Collections::Generic::KeyValuePair<System::String ^, System::Json::JsonValue ^> pair);
public void Add (System.Collections.Generic.KeyValuePair<string,System.Json.JsonValue> pair);
abstract member Add : System.Collections.Generic.KeyValuePair<string, System.Json.JsonValue> -> unit
override this.Add : System.Collections.Generic.KeyValuePair<string, System.Json.JsonValue> -> unit
Public Sub Add (pair As KeyValuePair(Of String, JsonValue))

Parameters

Implements

Remarks

Note

The System.Json namespace was designed for Silverlight, which is no longer supported. For processing JSON, we recommend using APIs in the System.Text.Json namespace instead.

Applies to

Add(String, JsonValue)

Adds an element with the provided key and value to the IDictionary<TKey,TValue>.

public:
 virtual void Add(System::String ^ key, System::Json::JsonValue ^ value);
public void Add (string key, System.Json.JsonValue value);
abstract member Add : string * System.Json.JsonValue -> unit
override this.Add : string * System.Json.JsonValue -> unit
Public Sub Add (key As String, value As JsonValue)

Parameters

key
String

The object to use as the key of the element to add.

value
JsonValue

The object to use as the value of the element to add.

Implements

Remarks

Note

The System.Json namespace was designed for Silverlight, which is no longer supported. For processing JSON, we recommend using APIs in the System.Text.Json namespace instead.

Applies to