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.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: