ImageConverter.CanConvertTo Method (ITypeDescriptorContext, Type)


Determines whether this ImageConverter can convert an Image to an instance of a specified type, using the specified context.

Namespace:   System.Drawing
Assembly:  System.Drawing (in System.Drawing.dll)

public override bool CanConvertTo(
	ITypeDescriptorContext context,
	Type destinationType


Type: System.ComponentModel.ITypeDescriptorContext

An ITypeDescriptorContext that provides a format context.

Type: System.Type

A Type that specifies the type you want to convert to.

Return Value

Type: System.Boolean

This method returns true if this ImageConverter can perform the conversion; otherwise, false.

This method returns true only if sourceType is equal to a byte array or string.

.NET Framework
Available since 1.1
Return to top