System.ComponentModel.TypeConverter.CanConvertFrom Method

Returns whether this converter can convert an object of the given type to the type of this converter, using the specified context.

Syntax

public virtual bool CanConvertFrom (ITypeDescriptorContext context, Type sourceType)

Parameters

context
An System.ComponentModel.ITypeDescriptorContext that provides a format context.
sourceType
A Type that represents the type you want to convert from.

Returns

true if this converter can perform the conversion; otherwise, false.

Remarks

As implemented in this class, this method returns false, unless sourceType is an System.ComponentModel.Design.Serialization.InstanceDescriptor.

Requirements

Namespace: System.ComponentModel
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0