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 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈