Converts a string to a single-precision floating point number.
[Visual Basic] Public Shared Function ToSingle( _ ByVal value As String _ ) As Single [C#] public static float ToSingle( string value ); [C++] public: static float ToSingle( String* value ); [JScript] public static function ToSingle( value : String ) : float;
The single-precision floating point value represented by the string.
Exception Type | Condition |
---|---|
XmlException | If value is null or a reference to a string that does not contain a valid decimal representation of a single-precision floating point number. |
The value parameter must be a non-null reference to a string that contains a well-formed decimal representation of a single-precision floating point number. The formats accepted by this method correspond to those accepted by the FromString method.
XmlString Class | XmlString Members | System.Xml Namespace | FromSingle