Gets a value indicating whether this converter can convert an object in the given source type to the native type of the converter using the context.
[Visual Basic] Overloads Overridable Public Function CanConvertFrom( _ ByVal context As ITypeDescriptorContext, _ ByVal sourceType As Type _ ) As Boolean [C#] public virtual bool CanConvertFrom( ITypeDescriptorContext context, Type sourceType ); [C++] public: virtual bool CanConvertFrom( ITypeDescriptorContext* context, Type* sourceType ); [JScript] public function CanConvertFrom( context : ITypeDescriptorContext, sourceType : Type ) : Boolean;
true if this converter can perform the conversion; otherwise, false.
The context can be used to extract additional information about the environment this converter is being invoked from. This may be a null reference (in Visual Basic Nothing), so you should always check. Also, properties on the context object may also return a null reference (Nothing).
TypeConverter Class | TypeConverter Members | System.ComponentModel Namespace | TypeConverter.CanConvertFrom Overload List | ITypeDescriptorContext