JsonObject.GetNamedString JsonObject.GetNamedString JsonObject.GetNamedString JsonObject.GetNamedString Method

Definition

Overloads

GetNamedString(String) GetNamedString(String) GetNamedString(String) GetNamedString(String)

Gets the String value with the specified name.

GetNamedString(String, String) GetNamedString(String, String) GetNamedString(String, String) GetNamedString(String, String)

Gets the String value with the specified name, or the provided default value if no such named value is found.

GetNamedString(String) GetNamedString(String) GetNamedString(String) GetNamedString(String)

Gets the String value with the specified name.

public : Platform::String GetNamedString(Platform::String name)
winrt::hstring GetNamedString(winrt::hstring name) const;
public string GetNamedString(String name)
Public Function GetNamedString(name As String) As string

Parameters

name
String String

The name.

Returns

string string

The String value with the specified name.

Remarks

This method should always used with a try/catch block because it throws an exception if the name found is not a String type or the name is not found.

See also

GetNamedString(String, String) GetNamedString(String, String) GetNamedString(String, String) GetNamedString(String, String)

Gets the String value with the specified name, or the provided default value if no such named value is found.

public : Platform::String GetNamedString(Platform::String name, Platform::String defaultValue)
winrt::hstring GetNamedString(winrt::hstring name, winrt::hstring defaultValue) const;
public string GetNamedString(String name, String defaultValue)
Public Function GetNamedString(name As String, defaultValue As String) As string

Parameters

name
String String

The name.

defaultValue
String String

The default value to use if the JSON property is not found.

Returns

string string

The String with the specified name, or if this value wasn't found, the defaultValue is returned.

See also