System.Web.UI.WebControls.FontUnitConverter.CanConvertFrom Method

Determines whether a data type can be converted to a System.Web.UI.WebControls.FontUnit.

Syntax

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

Parameters

context
A System.ComponentModel.ITypeDescriptorContext implemented object that provides information about the context of a type converter.
sourceType
A Type that represents the data type to check.

Returns

true if the data type specified by the sourceType parameter can be converted to a System.Web.UI.WebControls.FontUnit; otherwise, false.

Remarks

Use the FontUnitConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext, Type) method to determine whether the data type specified by the sourceType parameter can be converted to a System.Web.UI.WebControls.FontUnit.

Note:

This method will return true only if the sourceType is string. The only type this converter can convert into System.Web.UI.WebControls.FontUnit is string.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0