DataSourceViewSchemaConverter.CanConvertFrom Method

Definition

Indicates whether the specified source type can be converted to the type of the associated control property.

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

Parameters

context
ITypeDescriptorContext

An ITypeDescriptorContext implementation that can be used to gain additional context information.

sourceType
Type

The type to convert from.

Returns

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

Remarks

Call the CanConvertFrom method to determine whether the ConvertFrom method supports converting the source type.

The ConvertFrom method can convert only from a string, so the CanConvertFrom method returns true when sourceType is a string.

Applies to

Proizvod Verzije
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also