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.

返回

Boolean

trueJsonObject如果包含具有指定属性名称的元素,则为 ;否则为 false

例外

propertyNamenull

适用于