ISettingValue.ConvertTo<T> Method

Definition

Gets this ISettingValue object converted to a SettingValue<T>, if the conversion to T is successful.

public Microsoft.VisualStudio.Extensibility.Settings.SettingValue<T> ConvertTo<T> ();
abstract member ConvertTo : unit -> Microsoft.VisualStudio.Extensibility.Settings.SettingValue<'T>
Public Function ConvertTo(Of T) () As SettingValue(Of T)

Type Parameters

T

The expected type of the setting, only valid types for Setting<T> are supported.

Returns

This ISettingValue object converted to a SettingValue<T>.

Exceptions

If T is not a supported type of Setting<T>.

The conversion of the value to T is not supported.

The value is not in a format recognized by InvariantCulture for T.

The value represents a number that is out of the range of T.

Applies to