SelectionRangeConverter::CanConvertTo Method (ITypeDescriptorContext^, Type^)
Gets a value indicating whether this converter can convert an object to the specified destination type by using the specified context.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
public: virtual bool CanConvertTo( ITypeDescriptorContext^ context, Type^ destinationType ) override
Parameters
- context
-
Type:
System.ComponentModel::ITypeDescriptorContext^
A ITypeDescriptorContext that provides a format context.
- destinationType
-
Type:
System::Type^
The destination Type to convert into.
Return Value
Type: System::Booleantrue if this converter can perform the specified conversion; otherwise, false.
The CanConvertTo method returns true if the destinationType parameter is of type String or InstanceDescriptor. Otherwise, it defers the call to the base implementation of this method, TypeConverter::CanConvertTo(ITypeDescriptorContext^, Type^).
Notes to Inheritors:
Override this method to provide your own conversion requirements.
The context parameter can be used to extract additional information about the environment this converter is being invoked from. The parameter may be null, so you should always verify the information. Also, properties on the context object may also return null.
Available since 1.1