The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public override bool CanConvertTo(
	ITypeDescriptorContext context,
	Type destinationType


Type: System.ComponentModel.ITypeDescriptorContext

A ITypeDescriptorContext that provides a format context.

Type: System.Type

The destination Type to convert into.

Return Value

Type: System.Boolean
true 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.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
© 2015 Microsoft