JsonObject.Add Metodo

Definizione

Overload

Add(KeyValuePair<String,JsonNode>)

Aggiunge la proprietà specificata a JsonObject.

Add(String, JsonNode)

Aggiunge un elemento con il nome e il valore della proprietà specificati a JsonObject.

Add(KeyValuePair<String,JsonNode>)

Origine:
JsonObject.IDictionary.cs
Origine:
JsonObject.IDictionary.cs
Origine:
JsonObject.IDictionary.cs

Aggiunge la proprietà specificata a JsonObject.

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

Parametri

property
KeyValuePair<String,JsonNode>

Struttura KeyValuePair che rappresenta il nome e il valore della proprietà da aggiungere a JsonObject.

Implementazioni

Eccezioni

Un elemento con lo stesso nome di proprietà esiste già in JsonObject.

Il nome della proprietà di property è null.

Si applica a

Add(String, JsonNode)

Origine:
JsonObject.IDictionary.cs
Origine:
JsonObject.IDictionary.cs
Origine:
JsonObject.IDictionary.cs

Aggiunge un elemento con il nome e il valore della proprietà specificati a JsonObject.

public:
 virtual void Add(System::String ^ propertyName, System::Text::Json::Nodes::JsonNode ^ value);
public void Add (string propertyName, System.Text.Json.Nodes.JsonNode? value);
abstract member Add : string * System.Text.Json.Nodes.JsonNode -> unit
override this.Add : string * System.Text.Json.Nodes.JsonNode -> unit
Public Sub Add (propertyName As String, value As JsonNode)

Parametri

propertyName
String

Nome della proprietà dell'elemento da aggiungere.

value
JsonNode

Valore dell'elemento da aggiungere.

Implementazioni

Eccezioni

propertyName è null.

Un elemento con lo stesso nome di proprietà esiste già in JsonObject.

Si applica a