JsonObject.Add 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
Add(KeyValuePair<String,JsonValue>) |
将某项添加到 ICollection<T> 中。 |
Add(String, JsonValue) |
向 IDictionary<TKey,TValue> 添加一个带有所提供的键和值的元素。 |
Add(KeyValuePair<String,JsonValue>)
- Source:
- 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))
参数
- pair
- KeyValuePair<String,JsonValue>
实现
注解
注意
命名空间 System.Json 是为不再受支持的 Silverlight 设计的。 若要处理 JSON,建议改用 命名空间中的 System.Text.Json API。
适用于
Add(String, JsonValue)
- Source:
- 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。
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈