Method ConvertTo
ConvertTo(ITypeDescriptorContext?, CultureInfo?, object?, Type)
Converts the specified object to another type.
public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType)
Parameters
context
ITypeDescriptorContextA formatter context. Use this object to extract additional information about the environment from which this converter is being invoked. Always check whether this value is null. Also, properties on the context object may return null.
culture
CultureInfoA CultureInfo that specifies the culture to represent the color.
value
objectThe object to convert.
destinationType
TypeThe type to convert the object to.
Returns
Exceptions
- ArgumentNullException
destinationType
is null.- NotSupportedException
The conversion cannot be performed.