Redigera

Dela via


DataFieldConverter.CanConvertFrom(ITypeDescriptorContext, Type) Method

Definition

Gets a value indicating whether the specified source type can be converted to the type of the associated control property. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

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 object that represents the data-bound component or the control that the property belongs to.

sourceType
Type

The type to convert from.

Returns

true if sourceType is a string; otherwise false.

Remarks

Note

You typically do not access a type converter directly. This implementation of TypeConverter is intended for use by a data-bound control at design time, and is instantiated with a TypeConverterAttribute on a property.

Applies to

See also