Click or drag to resize
DigitalRuneObjectHelperConvertToT Method (Object, IFormatProvider)
Converts the object to the specified target type.

Namespace: DigitalRune
Assembly: DigitalRune (in DigitalRune.dll) Version: 1.20.0.0 (1.20.1.14552)
Syntax
public static T ConvertTo<T>(
	Object value,
	IFormatProvider provider
)

Parameters

value
Type: SystemObject
The value to convert.
provider
Type: SystemIFormatProvider
An object that supplies culture-specific formatting information.

Type Parameters

T
The target type.

Return Value

Type: T
A value of type T.
Exceptions
ExceptionCondition
FormatExceptionvalue is not in a format for T recognized by provider.
InvalidCastException This conversion is not supported.
Or, value is and T is a value type. Or, value does not implement the IConvertible interface.
OverflowExceptionvalue represents a number that is out of the range of T.
See Also