JsonObject.Insert(Int32, String, JsonNode) 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.
Inserts a property into the object at the specified index.
public:
void Insert(int index, System::String ^ propertyName, System::Text::Json::Nodes::JsonNode ^ value);
public void Insert(int index, string propertyName, System.Text.Json.Nodes.JsonNode? value);
member this.Insert : int * string * System.Text.Json.Nodes.JsonNode -> unit
Public Sub Insert (index As Integer, propertyName As String, value As JsonNode)
Parameters
- index
- Int32
The zero-based index at which the property should be inserted.
- propertyName
- String
The property name to insert.
- value
- JsonNode
The JSON value to insert.
Exceptions
propertyName
is null
.
An element with the same key already exists in the JsonObject.
index
is less than 0 or greater than Count.
Applies to
Συνεργαστείτε μαζί μας στο GitHub
Μπορείτε να βρείτε την πηγή για αυτό το περιεχόμενο στο GitHub, όπου μπορείτε επίσης να δημιουργήσετε και να εξετάσετε ζητήματα και αιτήματα έλξης. Για περισσότερες πληροφορίες, ανατρέξτε στον οδηγό συνεργατών.