JsonObject.GetNamedNumber JsonObject.GetNamedNumber JsonObject.GetNamedNumber JsonObject.GetNamedNumber Method

Definition

Overloads

GetNamedNumber(String) GetNamedNumber(String) GetNamedNumber(String) GetNamedNumber(String)

Gets the number value (a Double) with the specified name.

GetNamedNumber(String, Double) GetNamedNumber(String, Double) GetNamedNumber(String, Double) GetNamedNumber(String, Double)

Gets the number value (a Double) with the specified name, or the provided default value if no such named value is found.

GetNamedNumber(String) GetNamedNumber(String) GetNamedNumber(String) GetNamedNumber(String)

Gets the number value (a Double) with the specified name.

public : double GetNamedNumber(Platform::String name)
double GetNamedNumber(winrt::hstring name) const;
public double GetNamedNumber(String name)
Public Function GetNamedNumber(name As String) As double

Parameters

name
String String

The name.

Returns

double double

The Double 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 Double type or the name is not found.

See also

GetNamedNumber(String, Double) GetNamedNumber(String, Double) GetNamedNumber(String, Double) GetNamedNumber(String, Double)

Gets the number value (a Double) with the specified name, or the provided default value if no such named value is found.

public : double GetNamedNumber(Platform::String name, double defaultValue)
double GetNamedNumber(winrt::hstring name, double defaultValue) const;
public double GetNamedNumber(String name, Double defaultValue)
Public Function GetNamedNumber(name As String, defaultValue As Double) As double

Parameters

name
String String

The name.

defaultValue
Double Double

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

Returns

double double

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

See also