This documentation is archived and is not being maintained.

FontUnit::Parse Method (String, CultureInfo)

Converts the specified string to its FontUnit equivalent in the specified culture.

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

public:
static FontUnit Parse(
	String^ s, 
	CultureInfo^ culture
)

Parameters

s
Type: System::String

A string representation of one of the FontSize values.

culture
Type: System.Globalization::CultureInfo

A System.Globalization::CultureInfo that represents the culture of the FontUnit object.

Return Value

Type: System.Web.UI.WebControls::FontUnit
A FontUnit that represents the font size specified by the s parameter in the culture specified by the culture parameter.

Use the static Parse method to convert the specified string and culture to its FontUnit equivalent.

If the value of the s parameter is not nullptr, not String::Empty, and a valid FontSize value, the following table shows initial property values for the new instance of FontUnit.

Property

Initial Value

Type

The FontSize enumeration equivalent of the s parameter.

Unit

Empty

If the value of the s parameter is not nullptr, not String::Empty, and an invalid FontSize value, the following table shows initial property values for the new instance of FontUnit.

Property

Initial Value

Type

FontSize.AsUnit

Unit

A Unit object with its Value property initialized with the s parameter in the specified culture.

If the value of the s parameter is nullptr or String::Empty, the following table shows initial property values for an instance of FontUnit.

Property

Initial Value

Type

FontSize.NotSet

Unit

Empty

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, 1.1, 1.0
Show: