JsonObject.GetNamedValue Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Overload
GetNamedValue(String, JsonValue) |
Ottiene il valore JsonValue specificato o il valore predefinito specificato se non viene trovato alcun valore denominato. |
GetNamedValue(String) |
Ottiene il valore JsonValue con il nome specificato. |
GetNamedValue(String, JsonValue)
public:
virtual JsonValue ^ GetNamedValue(Platform::String ^ name, JsonValue ^ defaultValue) = GetNamedValue;
/// [Windows.Foundation.Metadata.Overload("GetNamedValueOrDefault")]
JsonValue GetNamedValue(winrt::hstring const& name, JsonValue const& defaultValue);
[Windows.Foundation.Metadata.Overload("GetNamedValueOrDefault")]
public JsonValue GetNamedValue(string name, JsonValue defaultValue);
function getNamedValue(name, defaultValue)
Public Function GetNamedValue (name As String, defaultValue As JsonValue) As JsonValue
Parametri
- name
-
String
Platform::String
winrt::hstring
Nome.
- defaultValue
- JsonValue
Valore predefinito da usare se la proprietà JSON non viene trovata.
Restituisce
JsonValue con il nome specificato o se questo valore non è stato trovato, viene restituito il valore predefinitoValue.
- Attributi
Vedi anche
Si applica a
GetNamedValue(String)
public:
virtual JsonValue ^ GetNamedValue(Platform::String ^ name) = GetNamedValue;
JsonValue GetNamedValue(winrt::hstring const& name);
public JsonValue GetNamedValue(string name);
function getNamedValue(name)
Public Function GetNamedValue (name As String) As JsonValue
Parametri
- name
-
String
Platform::String
winrt::hstring
Nome.
Restituisce
Valore JsonValue con il nome specificato.
Commenti
Questo metodo deve essere sempre usato con un blocco try/catch perché genera un'eccezione se il nome trovato non è un tipo JsonValue o il nome non viene trovato.