IEditorOptionValue.ValueOrDefault<T>(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 converted to the type T
, if the retrieval and the conversion to T
are successful.
Returns defaultValue
otherwise.
public T ValueOrDefault<T> (T defaultValue);
abstract member ValueOrDefault : 'T -> 'T
Public Function ValueOrDefault(Of T) (defaultValue As T) As T
Type Parameters
- T
The expected type of the setting.
Parameters
- defaultValue
- T
The value to return in case of error reading the editor option's value.
Returns
T
The value converted to the type T
.