語言

JsonObject.SetAt 方法

定義

多載

名稱 Description
SetAt(Int32, JsonNode)

在指定的索引處設定一個新的屬性值。

SetAt(Int32, String, JsonNode)

在指定的索引處設定一個新屬性。

SetAt(Int32, JsonNode)

來源:
JsonObject.IList.cs
來源:
JsonObject.IList.cs
來源:
JsonObject.IList.cs
來源:
JsonObject.IList.cs
來源:
JsonObject.IList.cs

在指定的索引處設定一個新的屬性值。

public:
 void SetAt(int index, System::Text::Json::Nodes::JsonNode ^ value);
public void SetAt(int index, System.Text.Json.Nodes.JsonNode? value);
member this.SetAt : int * System.Text.Json.Nodes.JsonNode -> unit
Public Sub SetAt (index As Integer, value As JsonNode)

參數

index
Int32

屬性的零基索引 要設定。

value
JsonNode

JSON 值要儲存在指定的索引上。

例外狀況

index 小於 0 或大於或等於 Count。

value 已經有父母了。

適用於

SetAt(Int32, String, JsonNode)

來源:
JsonObject.IList.cs
來源:
JsonObject.IList.cs
來源:
JsonObject.IList.cs
來源:
JsonObject.IList.cs
來源:
JsonObject.IList.cs

在指定的索引處設定一個新屬性。

public:
 void SetAt(int index, System::String ^ propertyName, System::Text::Json::Nodes::JsonNode ^ value);
public void SetAt(int index, string propertyName, System.Text.Json.Nodes.JsonNode? value);
member this.SetAt : int * string * System.Text.Json.Nodes.JsonNode -> unit
Public Sub SetAt (index As Integer, propertyName As String, value As JsonNode)

參數

index
Int32

屬性的零基索引 要設定。

propertyName
String

要儲存在指定索引的屬性名稱。

value
JsonNode

JSON 值要儲存在指定的索引上。

例外狀況

index 小於 0 或大於或等於 Count。

propertyName 已在不同的索引中指定。

value 已經有父母了。

適用於