JsonElement.Item[Int32] Property

Definition

Gets the value at the specified index if the current value is an Array.

C#
public System.Text.Json.JsonElement this[int index] { get; }

Parameters

index
Int32

The item index.

Property Value

The value at the specified index.

Exceptions

index is not in the range [0, GetArrayLength()()).

The parent JsonDocument has been disposed.

Applies to

Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)