System.Web.UI.WebControls.FontUnit.Parse Method

Converts the specified string to its System.Web.UI.WebControls.FontUnit equivalent.

Syntax

public static FontUnit Parse (string s)

Parameters

s
A string representation of one of the System.Web.UI.WebControls.FontSize values.

Returns

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

Remarks

Use the static FontUnit.Parse(string) method to convert the specified string to its System.Web.UI.WebControls.FontUnit equivalent.

If the value of the s parameter is not null, not string.Empty, and a valid System.Web.UI.WebControls.FontSize value, the following table shows initial property values for the new instance of System.Web.UI.WebControls.FontUnit.

Type

The System.Web.UI.WebControls.FontSize enumeration equivalent of the s parameter.

Unit

Unit.Empty

If the value of the s parameter is not null, not string.Empty, and an invalid System.Web.UI.WebControls.FontSize value, the following table shows initial property values for the new instance of System.Web.UI.WebControls.FontUnit.

Type

FontSize.AsUnit

Unit

A System.Web.UI.WebControls.Unit object with its Unit.Value property initialized with the s parameter in the current thread's culture.

If the value of the s parameter is null or string.Empty, the following table shows initial property values for the new instance of System.Web.UI.WebControls.FontUnit.

Type

FontSize.NotSet

Unit

Unit.Empty

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0