Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

FontUnitConverter.ConvertTo Method (ITypeDescriptorContext, CultureInfo, Object, Type)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Converts a FontUnit to an object with a different data type.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public override object ConvertTo(
	ITypeDescriptorContext context,
	CultureInfo culture,
	object value,
	Type destinationType
)

Parameters

context
Type: System.ComponentModel.ITypeDescriptorContext

An System.ComponentModel.ITypeDescriptorContext implemented object that provides information about the context of a type converter.

culture
Type: System.Globalization.CultureInfo

A System.Globalization.CultureInfo that specifies the culture to represent the FontUnit, when it is expressed in points.

value
Type: System.Object

A System.Object that represents the FontUnit to convert.

destinationType
Type: System.Type

A System.Type that represents the data type to convert to.

Return Value

Type: System.Object

A System.Object that represents the converted value.

Use the ConvertTo method to convert the FontUnit specified by the value parameter to an object with the data type specified by the destinationType parameter.

System_CAPS_noteNote

String.Empty is returned from this method if the value parameter contains null. String.Empty is also returned if the Type property of the FontUnit specified by the value parameter contains the value FontSize.NotSet.

System_CAPS_noteNote

This method can only convert a FontUnit to a string.

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft