SettingValue<T>.ValueOrDefault(T) 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.
Gets the value, if the retrieval was successful. Returns defaultValue
otherwise.
public T ValueOrDefault (T defaultValue);
member this.ValueOrDefault : 'T -> 'T
Public Function ValueOrDefault (defaultValue As T) As T
Parameters
- defaultValue
- T
The value to return in case of error reading the setting's value.
Returns
T
The value converted to the type T
.
Exceptions
If T
is not a supported type of Setting<T>.