Converts the specified string to its System.Web.UI.WebControls.FontUnit equivalent.
- s
- A string representation of one of the System.Web.UI.WebControls.FontSize values.
A System.Web.UI.WebControls.FontUnit that represents the font size specified by the s parameter.
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 |
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 |