JsonObject.TryGetPropertyValue Metodo

Definizione

Overload

Nome Descrizione
TryGetPropertyValue(String, JsonNode, Int32)

Ottiene il valore associato al nome della proprietà specificato.

TryGetPropertyValue(String, JsonNode)

Restituisce il valore di una proprietà con il nome specificato.

TryGetPropertyValue(String, JsonNode, Int32)

Origine:
JsonObject.cs
Origine:
JsonObject.cs
Origine:
JsonObject.cs
Origine:
JsonObject.cs

Ottiene il valore associato al nome della proprietà specificato.

public:
 bool TryGetPropertyValue(System::String ^ propertyName, [Runtime::InteropServices::Out] System::Text::Json::Nodes::JsonNode ^ % jsonNode, [Runtime::InteropServices::Out] int % index);
public bool TryGetPropertyValue(string propertyName, out System.Text.Json.Nodes.JsonNode? jsonNode, out int index);
member this.TryGetPropertyValue : string * JsonNode * int -> bool
Public Function TryGetPropertyValue (propertyName As String, ByRef jsonNode As JsonNode, ByRef index As Integer) As Boolean

Parametri

propertyName
String

Nome della proprietà del valore da ottenere.

jsonNode
JsonNode

Quando termina, questo metodo contiene il valore associato al nome della proprietà specificato, se viene trovato il nome della proprietà; in caso contrario null, .

index
Int32

Indice di propertyName se trovato; in caso contrario, -1.

Valori restituiti

true JsonObject se contiene un elemento con il nome della proprietà specificato; in caso contrario, false.

Eccezioni

propertyName è null.

Si applica a

TryGetPropertyValue(String, JsonNode)

Origine:
JsonObject.cs
Origine:
JsonObject.cs
Origine:
JsonObject.cs
Origine:
JsonObject.cs
Origine:
JsonObject.cs
Origine:
JsonObject.cs
Origine:
JsonObject.cs

Restituisce il valore di una proprietà con il nome specificato.

public:
 bool TryGetPropertyValue(System::String ^ propertyName, [Runtime::InteropServices::Out] System::Text::Json::Nodes::JsonNode ^ % jsonNode);
public bool TryGetPropertyValue(string propertyName, out System.Text.Json.Nodes.JsonNode? jsonNode);
member this.TryGetPropertyValue : string * JsonNode -> bool
Public Function TryGetPropertyValue (propertyName As String, ByRef jsonNode As JsonNode) As Boolean

Parametri

propertyName
String

Nome della proprietà da restituire.

jsonNode
JsonNode

Valore JSON della proprietà con il nome specificato.

Valori restituiti

true se è stata trovata una proprietà con il nome specificato; in caso contrario, false.

Eccezioni

propertyName è null.

Si applica a