FontUnit.Parse Method (String, CultureInfo)
Assembly: System.Web (in system.web.dll)
public static FontUnit Parse ( String s, CultureInfo culture )
public static function Parse ( s : String, culture : CultureInfo ) : FontUnit
Not applicable.
Parameters
- s
A string representation of one of the FontSize values.
- culture
A System.Globalization.CultureInfo that represents the culture of the FontUnit object.
Return Value
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 a null reference (Nothing in Visual Basic), 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 |
If the value of the s parameter is not a null reference (Nothing in Visual Basic), 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 a null reference (Nothing in Visual Basic) or String.Empty, the following table shows initial property values for an instance of FontUnit.
| Property | Initial Value |
|---|---|
| Type | FontSize.NotSet |
| Unit | Empty |