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
contextITypeDescriptorContextA 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.
cultureCultureInfoA CultureInfo that specifies the culture to represent the color.
valueobjectThe object to convert.
destinationTypeTypeThe type to convert the object to.
Returns
Exceptions
- ArgumentNullException
destinationTypeis null.- NotSupportedException
The conversion cannot be performed.