JsonNode.Item[] Property
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.
Item[Int32] |
Gets or sets the element at the specified index. |
Item[String] |
Gets or sets the element with the specified property name.
If the property is not found, |
- Source:
- JsonNode.cs
- Source:
- JsonNode.cs
- Source:
- JsonNode.cs
- Source:
- JsonNode.cs
- Source:
- JsonNode.cs
- Source:
- JsonNode.cs
Gets or sets the element at the specified index.
public:
property System::Text::Json::Nodes::JsonNode ^ default[int] { System::Text::Json::Nodes::JsonNode ^ get(int index); void set(int index, System::Text::Json::Nodes::JsonNode ^ value); };
public System.Text.Json.Nodes.JsonNode? this[int index] { get; set; }
member this.Item(int) : System.Text.Json.Nodes.JsonNode with get, set
Default Public Property Item(index As Integer) As JsonNode
Parameters
- index
- Int32
The zero-based index of the element to get or set.
Property Value
Exceptions
index
is less than 0 or index
is greater than the number of properties.
Applies to
.NET 10 and other versions
Product | Versions |
---|---|
.NET | 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10 |
.NET Standard | 2.0 (package-provided) |
- Source:
- JsonNode.cs
- Source:
- JsonNode.cs
- Source:
- JsonNode.cs
- Source:
- JsonNode.cs
- Source:
- JsonNode.cs
- Source:
- JsonNode.cs
Gets or sets the element with the specified property name.
If the property is not found, null
is returned.
public:
property System::Text::Json::Nodes::JsonNode ^ default[System::String ^] { System::Text::Json::Nodes::JsonNode ^ get(System::String ^ propertyName); void set(System::String ^ propertyName, System::Text::Json::Nodes::JsonNode ^ value); };
public System.Text.Json.Nodes.JsonNode? this[string propertyName] { get; set; }
member this.Item(string) : System.Text.Json.Nodes.JsonNode with get, set
Default Public Property Item(propertyName As String) As JsonNode
Parameters
- propertyName
- String
The name of the property to return.
Property Value
Exceptions
propertyName
is null
.
The current JsonNode is not a JsonObject.
Applies to
.NET 10 and other versions
Product | Versions |
---|---|
.NET | 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10 |
.NET Standard | 2.0 (package-provided) |
.NET feedback
.NET is an open source project. Select a link to provide feedback: