Single..::..Parse Method (String)
Converts the string representation of a number to its single-precision floating-point number equivalent.
Namespace:
SystemAssembly: Bridge (in Bridge.dll)
Syntax
[TemplateAttribute] public static float Parse( string s )
<TemplateAttribute> _ Public Shared Function Parse ( _ s As String _ ) As Single
[TemplateAttribute] public: static float^ Parse( String^ s )
Parameters
- s
- Type: System..::..String
A string that contains a number to convert.
Return Value
A single-precision floating-point number equivalent to the numeric value or symbol specified in s.Exceptions
Exception | Condition |
---|---|
System..::..ArgumentNullException | s is null. |
System..::..FormatException | s does not represent a number in a valid format. |
System..::..OverflowException | s represents a number less than MinValue or greater than MaxValue. |