NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Convert.ToSingle (String)

Converts a String to a Single.

[Visual Basic]
Overloads 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;

Parameters

value
A string representation of a Single value.

Return Value

Returns the value as a Single.

Exceptions

Exception Type Condition
ArgumentException If value is null.
FormatException If value does not contain a representation that can be converted to a Single using the Parse(String) method implemented by that type.
OverflowException If value represents a number that is less than Single.MinValue or greater than Single.MaxValue.

Remarks

Implementation is the same as FromString.

See Also

Convert Class | Convert Members | System Namespace | Convert.ToSingle Overload List