JsonObject.TryGetPropertyValue(String, JsonNode) 方法

定義

傳回具有指定名稱的屬性值。

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

參數

propertyName
String

要傳回的屬性名稱。

jsonNode
JsonNode

具有指定名稱之屬性的 JSON 值。

傳回

true 如果找到具有指定名稱的屬性,則為 ;否則為 false

適用於