Share via


JsonObject.IDictionary<String,JsonNode>.TryGetValue Metode

Definisi

Mendapatkan nilai yang terkait dengan nama properti yang ditentukan.

 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

Parameter

propertyName
String

Nama properti dari nilai yang akan didapatkan.

jsonNode
JsonNode

Ketika metode ini kembali, berisi nilai yang terkait dengan nama properti yang ditentukan, jika nama properti ditemukan; jika tidak, null.

Mengembalikan

trueJsonObject jika berisi elemen dengan nama properti yang ditentukan; jika tidak, false.

Pengecualian

propertyNameadalah null.

Berlaku untuk