System.Windows.Forms.SelectionRangeConverter.CanConvertFrom Method

Determines if this converter can convert an object of the specified source type to the native type of the converter by querying the supplied type descriptor context.

Syntax

public override bool CanConvertFrom (System.ComponentModel.ITypeDescriptorContext context, Type sourceType)

Parameters

context
A System.ComponentModel.ITypeDescriptorContext that provides a format context.
sourceType
The source Type to be converted.

Returns

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

Remarks

The System.Windows.Forms.SelectionRangeConverter class is specialized to convert between the types string and System.Windows.Forms.SelectionRange. As a result, the SelectionRangeConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext, Type) method returns true if the sourceType parameter is of type string. Otherwise, it defers the call to the base implementation of this method, System.ComponentModel.TypeConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext, Type).

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0