JsonObject.Insert(Int32, String, JsonNode) Metoda

Definicja

Wstawia właściwość do obiektu w określonym indeksie.

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)

Parametry

index
Int32

Indeks oparty na zerach, w którym należy wstawić właściwość.

propertyName
String

Nazwa właściwości do wstawienia.

value
JsonNode

Wartość JSON do wstawienia.

Wyjątki

propertyName jest null.

Element o tym samym kluczu już istnieje w JsonObject.

index jest mniejsza niż 0 lub większa niż Count.

Dotyczy