ISettingsList.GetValueOrDefault<T>(String, T) Method
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.
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);
public T GetValueOrDefault<T> (string key, T defaultValue = default);
abstract member GetValueOrDefault : string * 'T -> 'T
Public Function GetValueOrDefault(Of T) (key As String, Optional defaultValue As T = Nothing) As T
- T
The type of the value.
- key
- String
The key.
- defaultValue
- T
The default value.
Returns Task.
Thrown when key
is null.
Thrown when key
is empty.
This method is safe to access from any thread.