JsonArray.Add 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| Add(JsonNode) | |
| Add<T>(T) |
將物件加入至 JsonArray的結尾。 |
Add(JsonNode)
public:
virtual void Add(System::Text::Json::Nodes::JsonNode ^ item);
public void Add(System.Text.Json.Nodes.JsonNode? item);
abstract member Add : System.Text.Json.Nodes.JsonNode -> unit
override this.Add : System.Text.Json.Nodes.JsonNode -> unit
Public Sub Add (item As JsonNode)
參數
實作
適用於
Add<T>(T)
- 來源:
- JsonArray.cs
- 來源:
- JsonArray.cs
- 來源:
- JsonArray.cs
- 來源:
- JsonArray.cs
- 來源:
- JsonArray.cs
- 來源:
- JsonArray.cs
- 來源:
- JsonArray.cs
- 來源:
- JsonArray.cs
將物件加入至 JsonArray的結尾。
public:
generic <typename T>
void Add(T value);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Creating JsonValue instances with non-primitive types requires generating code at runtime.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Creating JsonValue instances with non-primitive types is not compatible with trimming. It can result in non-primitive types being serialized, which may have their members trimmed.")]
public void Add<T>(T? value);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Creating JsonValue instances with non-primitive types is not compatible with trimming. It can result in non-primitive types being serialized, which may have their members trimmed.")]
public void Add<T>(T? value);
public void Add<T>(T? value);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Creating JsonValue instances with non-primitive types requires generating code at runtime.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Creating JsonValue instances with non-primitive types is not compatible with trimming. It can result in non-primitive types being serialized, which may have their members trimmed.")>]
member this.Add : 'T -> unit
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Creating JsonValue instances with non-primitive types is not compatible with trimming. It can result in non-primitive types being serialized, which may have their members trimmed.")>]
member this.Add : 'T -> unit
member this.Add : 'T -> unit
Public Sub Add(Of T) (value As T)
類型參數
- T
要加入的物件類型。
參數
- value
- T
要加入 JsonArray的物件 。
- 屬性