ISettingsList.GetValueOrDefault<T>(String, T) Method

Definition

Returns the value corresponding to the given key. Returns defaultValue if the value is missing or not parsable as T.

template <typename T>
 T GetValueOrDefault(std::wstring const & key, T defaultValue = null);

Type Parameters

T

The type of the value.

Parameters

key
String

The key.

defaultValue
T

The default value.

Returns

T

Returns Task.

Exceptions

Thrown when key is null.

Thrown when key is empty.

Remarks

This method is safe to access from any thread.

Applies to