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.
- context
- A System.ComponentModel.ITypeDescriptorContext that provides a format context.
- sourceType
- The source Type to be converted.
true if the converter can perform the specified conversion; otherwise, false.
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).