DataSourceIDConverter.CanConvertFrom Method (ITypeDescriptorContext, Type)
.NET Framework 3.0
Gets a value indicating whether this converter can convert an object in the specified source type to the native type of the converter.
Namespace: System.Web.UI.Design.WebControls
Assembly: System.Design (in system.design.dll)
Assembly: System.Design (in system.design.dll)
public: virtual bool CanConvertFrom ( ITypeDescriptorContext^ context, Type^ sourceType ) override
public boolean CanConvertFrom ( ITypeDescriptorContext context, Type sourceType )
public override function CanConvertFrom ( context : ITypeDescriptorContext, sourceType : Type ) : boolean
Not applicable.
Parameters
- context
An object implementing the ITypeDescriptorContext that provides information about a context to a type converter so that the type converter can perform a conversion.
- sourceType
The Type of the object for which conversion is being requested.
Return Value
true if sourceType is a string; otherwise, false.The ConvertFrom method can only convert from a string, so the CanConvertFrom only returns true when sourcetype is a string.
The CanConvertFrom does not use the context parameter.
Community Additions
ADD
Show: