Share via


SettingValue<T>.ISettingValue.ValueOrDefault<TInterface> Method

Definition

Gets the value converted to the type T, if the retrieval and the conversion to T are successful. Returns defaultValue otherwise.

TInterface ISettingValue.ValueOrDefault<TInterface> (TInterface defaultValue);
abstract member Microsoft.VisualStudio.Extensibility.Settings.ISettingValue.ValueOrDefault : 'Interface -> 'Interface
override this.Microsoft.VisualStudio.Extensibility.Settings.ISettingValue.ValueOrDefault : 'Interface -> 'Interface
Function ValueOrDefault(Of TInterface) (defaultValue As TInterface) As TInterface Implements ISettingValue.ValueOrDefault

Type Parameters

TInterface

Parameters

defaultValue
TInterface

The value to return in case of error reading the setting's value.

Returns

TInterface

The value converted to the type T.

Implements

Applies to