JsonObject.IDictionary<String,JsonNode>.TryGetValue 方法

定義

取得與指定之屬性名稱相關聯的值。

 virtual bool System.Collections.Generic.IDictionary<System.String,System.Text.Json.Nodes.JsonNode>.TryGetValue(System::String ^ propertyName, [Runtime::InteropServices::Out] System::Text::Json::Nodes::JsonNode ^ % jsonNode) = System::Collections::Generic::IDictionary<System::String ^, System::Text::Json::Nodes::JsonNode ^>::TryGetValue;
bool IDictionary<string,JsonNode>.TryGetValue (string propertyName, out System.Text.Json.Nodes.JsonNode jsonNode);
abstract member System.Collections.Generic.IDictionary<System.String,System.Text.Json.Nodes.JsonNode>.TryGetValue : string * JsonNode -> bool
override this.System.Collections.Generic.IDictionary<System.String,System.Text.Json.Nodes.JsonNode>.TryGetValue : string * JsonNode -> bool
Function TryGetValue (propertyName As String, ByRef jsonNode As JsonNode) As Boolean Implements IDictionary(Of String, JsonNode).TryGetValue

參數

propertyName
String

要取得之值的屬性名稱。

jsonNode
JsonNode

當這個方法傳回時,如果找到屬性名稱,則包含與指定屬性名稱相關聯的值;否則為 null

傳回

trueJsonObject如果 包含具有指定屬性名稱的專案,則為 , false 否則為 。

例外狀況

propertyNamenull

適用於