JsonObject.SetAt Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
SetAt(Int32, String, JsonNode) |
Sets a new property at the specified index. |
SetAt(Int32, JsonNode) |
Sets a new property value at the specified index. |
SetAt(Int32, String, JsonNode)
- Source:
- JsonObject.IList.cs
Sets a new property at the specified index.
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)
Parameters
- index
- Int32
The zero-based index of the property to set.
- propertyName
- String
The property name to store at the specified index.
- value
- JsonNode
The JSON value to store at the specified index.
Exceptions
index
is less than 0 or greater than or equal to Count.
propertyName
is already specified in a different index.
value
already has a parent.
Applies to
SetAt(Int32, JsonNode)
- Source:
- JsonObject.IList.cs
Sets a new property value at the specified index.
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)
Parameters
- index
- Int32
The zero-based index of the property to set.
- value
- JsonNode
The JSON value to store at the specified index.
Exceptions
index
is less than 0 or greater than or equal to Count.
value
already has a parent.