This documentation is archived and is not being maintained.

FontUnit::ToString Method (IFormatProvider)

Converts a FontUnit object to a string equivalent using the specified format provider.

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

public:
String^ ToString(
	IFormatProvider^ formatProvider
)

Parameters

formatProvider
Type: System::IFormatProvider

An IFormatProvider that supplies culture-specific formatting information, which is used if the Type property is set to the AsUnit value; otherwise, it is ignored.

Return Value

Type: System::String
A string that represents this FontUnit, with any numeric unit value in the format specified by formatProvider.

Use the ToString method to retrieve the string representation of the FontUnit object using a culture-specific format provider for any numeric values that are in the string.

If the Type property is set to the AsUnit value, the returned string is the string equivalent of the unit value that is contained in the Unit property. The numeric portion of the Unit value is formatted using the specified formatProvider. In other words, when the Type property is set to the AsUnit value, the returned string representation is generated using the Unit::ToString(IFormatProvider) method on the unit object that is stored in the Unit property.

If the Type property is set to any other FontSize value, the returned string is the string equivalent of the FontSize value.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Show: