JsonNode.Item[] Property
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
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, |
Item[Int32]
- 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
Item[String]
- 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
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應