JsonObject.TryGetPropertyValue Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Surcharges
| Nom | Description |
|---|---|
| TryGetPropertyValue(String, JsonNode, Int32) |
Obtient la valeur associée au nom de propriété spécifié. |
| TryGetPropertyValue(String, JsonNode) |
Retourne la valeur d’une propriété portant le nom spécifié. |
TryGetPropertyValue(String, JsonNode, Int32)
- Source:
- JsonObject.cs
- Source:
- JsonObject.cs
- Source:
- JsonObject.cs
- Source:
- JsonObject.cs
Obtient la valeur associée au nom de propriété spécifié.
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
Paramètres
- propertyName
- String
Nom de propriété de la valeur à obtenir.
- jsonNode
- JsonNode
Lorsque cette méthode est retournée, elle contient la valeur associée au nom de propriété spécifié, si le nom de la propriété est trouvé ; sinon null.
- index
- Int32
Index du propertyName cas échéant ; sinon, -1.
Retours
true si le JsonObject fichier contient un élément portant le nom de propriété spécifié ; sinon, false.
Exceptions
propertyName a la valeur null.
S’applique à
TryGetPropertyValue(String, JsonNode)
- Source:
- JsonObject.cs
- Source:
- JsonObject.cs
- Source:
- JsonObject.cs
- Source:
- JsonObject.cs
- Source:
- JsonObject.cs
- Source:
- JsonObject.cs
- Source:
- JsonObject.cs
Retourne la valeur d’une propriété portant le nom spécifié.
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
Paramètres
- propertyName
- String
Nom de la propriété à retourner.
- jsonNode
- JsonNode
Valeur JSON de la propriété avec le nom spécifié.
Retours
true si une propriété portant le nom spécifié a été trouvée ; sinon, false.
Exceptions
propertyName a la valeur null.