JsonObject.Add Méthode

Définition

Surcharges

Add(KeyValuePair<String,JsonNode>)

Ajoute la propriété spécifiée au JsonObject.

Add(String, JsonNode)

Ajoute un élément avec le nom et la valeur de propriété fournis à .JsonObject

Add(KeyValuePair<String,JsonNode>)

Source:
JsonObject.IDictionary.cs
Source:
JsonObject.IDictionary.cs
Source:
JsonObject.IDictionary.cs

Ajoute la propriété spécifiée au 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))

Paramètres

property
KeyValuePair<String,JsonNode>

Structure KeyValuePair représentant le nom et la valeur de la propriété à ajouter au JsonObject.

Implémente

Exceptions

Un élément portant le même nom de propriété existe déjà dans le JsonObject.

Le nom de la propriété de property est null.

S’applique à

Add(String, JsonNode)

Source:
JsonObject.IDictionary.cs
Source:
JsonObject.IDictionary.cs
Source:
JsonObject.IDictionary.cs

Ajoute un élément avec le nom et la valeur de propriété fournis à .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)

Paramètres

propertyName
String

Nom de propriété de l’élément à ajouter.

value
JsonNode

Valeur de l'élément à ajouter.

Implémente

Exceptions

propertyName a la valeur null.

Un élément portant le même nom de propriété existe déjà dans le JsonObject.

S’applique à