ObjectExtensionIsConvertibleTo Method (Object, Type, Object, CultureInfo) |
Converts the given value to the given type using the
default converter.
A return value indicates whether the operation succeeded.
Namespace:
TB.ComponentModel
Assembly:
UniversalTypeConverter (in UniversalTypeConverter.dll) Version: 2.0.0
Syntax public static bool IsConvertibleTo(
this Object value,
Type destinationType,
out Object result,
CultureInfo culture = null
)
Parameters
- value
- Type: SystemObject
The value which is converted. - destinationType
- Type: SystemType
The type to which the given value is converted. - result
- Type: SystemObject
An instance of type destinationType whose value is equivalent to the given value if the operation succeeded. - culture (Optional)
- Type: System.GlobalizationCultureInfo
The culture to use. If not given or null, the DefaultCulture is used.
Return Value
Type:
Booleantrue, if
value was converted successfully; otherwise, false.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Object. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also