JsonObject.Add 方法

定義

多載

Add(KeyValuePair<String,JsonValue>)

將項目加入至 ICollection<T>

Add(String, JsonValue)

將隨附有索引鍵和值的項目加入至 IDictionary<TKey,TValue>

Add(KeyValuePair<String,JsonValue>)

來源:
JsonObject.cs

將項目加入至 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))

參數

實作

備註

注意

命名空間 System.Json 是針對不再支援的 Silverlight 所設計。 若要處理 JSON,建議您改用 命名空間中的 System.Text.Json API。

適用於

Add(String, JsonValue)

來源:
JsonObject.cs

將隨附有索引鍵和值的項目加入至 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)

參數

key
String

做為要加入項目之索引鍵的物件。

value
JsonValue

做為要加入項目之值的物件。

實作

備註

注意

命名空間 System.Json 是針對不再支援的 Silverlight 所設計。 若要處理 JSON,建議您改用 命名空間中的 System.Text.Json API。

適用於