Click or drag to resize

TypeConverterConvert Method

Converts the given value to the given type.

Namespace:  TB.ComponentModel
Assembly:  UniversalTypeConverter (in UniversalTypeConverter.dll) Version: 2.0.0
Syntax
C#
public Object Convert(
	Object value,
	Type destinationType,
	CultureInfo culture = null
)

Parameters

value
Type: SystemObject
The value which is converted.
destinationType
Type: SystemType
The type to which the given value is converted.
culture (Optional)
Type: System.GlobalizationCultureInfo
The culture to use. If not given or null, the DefaultCulture is used.

Return Value

Type: Object
An instance of type destinationType whose value is equivalent to the given value.
Exceptions
ExceptionCondition
InvalidConversionExceptionInvalidConversionException if the value is not convertible to the given type.
See Also