JsonObject.GetNamedArray Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetNamedArray(String) |
Gets the JsonArray value with the specified name. |
GetNamedArray(String, JsonArray) |
Gets the JsonArray value with the specified name, or the provided default value if no such named value is found. |
GetNamedArray(String)
public:
virtual JsonArray ^ GetNamedArray(Platform::String ^ name) = GetNamedArray;
JsonArray GetNamedArray(winrt::hstring const& name);
public JsonArray GetNamedArray(string name);
function getNamedArray(name)
Public Function GetNamedArray (name As String) As JsonArray
Parameters
- name
-
String
Platform::String
winrt::hstring
The name.
Returns
The JsonArray 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 JsonArray type or the name is not found.
See also
Applies to
GetNamedArray(String, JsonArray)
public:
virtual JsonArray ^ GetNamedArray(Platform::String ^ name, JsonArray ^ defaultValue) = GetNamedArray;
/// [Windows.Foundation.Metadata.Overload("GetNamedArrayOrDefault")]
JsonArray GetNamedArray(winrt::hstring const& name, JsonArray const& defaultValue);
[Windows.Foundation.Metadata.Overload("GetNamedArrayOrDefault")]
public JsonArray GetNamedArray(string name, JsonArray defaultValue);
function getNamedArray(name, defaultValue)
Public Function GetNamedArray (name As String, defaultValue As JsonArray) As JsonArray
Parameters
- name
-
String
Platform::String
winrt::hstring
The name.
- defaultValue
- JsonArray
The default value to use if the JSON property is not found.
Returns
The JsonArray with the specified name, or if this value wasn't found, the defaultValue is returned.
- Attributes