FontUnit::ToString Method (IFormatProvider^)
Converts a FontUnit object to a string equivalent using the specified format provider.
Assembly: System.Web (in System.Web.dll)
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.
Available since 2.0