DataSourceIDConverter.CanConvertFrom Method (ITypeDescriptorContext, Type)
.NET Framework 2.0
Note: This method is new in the .NET Framework version 2.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
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.
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Show: