ValueProviderResult.ConvertTo 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.
Overloads
ConvertTo(Type) |
Converts the value that is encapsulated by this result to the specified type. |
ConvertTo(Type, CultureInfo) |
Converts the value that is encapsulated by this result to the specified type by using the specified culture information. |
ConvertTo(Type)
Converts the value that is encapsulated by this result to the specified type.
public object ConvertTo (Type type);
member this.ConvertTo : Type -> obj
Public Function ConvertTo (type As Type) As Object
Parameters
- type
- Type
The target type.
Returns
The converted value.
Exceptions
The type
parameter is null.
Applies to
ConvertTo(Type, CultureInfo)
Converts the value that is encapsulated by this result to the specified type by using the specified culture information.
public virtual object ConvertTo (Type type, System.Globalization.CultureInfo culture);
abstract member ConvertTo : Type * System.Globalization.CultureInfo -> obj
override this.ConvertTo : Type * System.Globalization.CultureInfo -> obj
Public Overridable Function ConvertTo (type As Type, culture As CultureInfo) As Object
Parameters
- type
- Type
The target type.
- culture
- CultureInfo
The culture to use in the conversion.
Returns
The converted value.
Exceptions
The type
parameter is null.