Redigera

Dela via


UnitConverter.CanConvertFrom(ITypeDescriptorContext, Type) Method

Definition

Returns a value indicating whether the unit converter can convert from the specified source type.

public:
 override bool CanConvertFrom(System::ComponentModel::ITypeDescriptorContext ^ context, Type ^ sourceType);
public override bool CanConvertFrom (System.ComponentModel.ITypeDescriptorContext context, Type sourceType);
override this.CanConvertFrom : System.ComponentModel.ITypeDescriptorContext * Type -> bool
Public Overrides Function CanConvertFrom (context As ITypeDescriptorContext, sourceType As Type) As Boolean

Parameters

context
ITypeDescriptorContext

An ITypeDescriptorContext instance that specifies the context of the object to convert.

sourceType
Type

The type of the source.

Returns

true if the source type can be converted from; otherwise, false.

Applies to

See also