System.Web.UI.WebControls.FontUnitConverter.ConvertTo Method

Converts a System.Web.UI.WebControls.FontUnit to an object with a different data type.

Syntax

public override object ConvertTo (System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)

Parameters

context
An System.ComponentModel.ITypeDescriptorContext implemented object that provides information about the context of a type converter.
culture
A System.Globalization.CultureInfo that specifies the culture to represent the System.Web.UI.WebControls.FontUnit, when it is expressed in points.
value
A object that represents the System.Web.UI.WebControls.FontUnit to convert.
destinationType
A Type that represents the data type to convert to.

Returns

A object that represents the converted value.

Remarks

Use the FontUnitConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, object, Type) method to convert the System.Web.UI.WebControls.FontUnit specified by the value parameter to an object with the data type specified by the destinationType parameter.

Note:

string.Empty is returned from this method if the value parameter contains null. string.Empty is also returned if the FontUnit.Type property of the System.Web.UI.WebControls.FontUnit specified by the value parameter contains the value FontSize.NotSet.

Note:

This method can only convert a System.Web.UI.WebControls.FontUnit to a string.

Requirements

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