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!

Double.Parse (String)

Converts a string to a Double.

[Visual Basic]
Overloads Public Shared Function Parse( _
   ByVal s As String _
) As Double
[C#]
public static double Parse(
   string s
);
[C++]
public: static double Parse(
   String* s
);
[JScript]
public static function Parse(
   s : String
) : double;

Parameters

s
The string to convert to a Double.

Return Value

The Double whose value was specified by s.

Exceptions

Exception Type Condition
ArgumentNullException If the sting is a null reference (in Visual Basic Nothing).
FormatException If the string is not the correct format.

Remarks

Double numbers are never beyond the scope of Parse. When the numbers are large, they return positive infinity; when they are small, they return negative infinity.

Note that the Parse methods do not accept not a number (NaN), positive infinity, or negative infinity; instead PositiveInfinity, NegativeInfinity, or NaN will be returned. (For addition information, see PositiveInfinity, NegativeInfinity, and NaN.)

The output from ToString should be consumable by FromString.

The s parameter is a representation of a floating-point number. For example, "123.12 e5" and "123.12e 5" are not acceptable strings for s. The string must consist of an optional minus sign ("-") followed by a sequence of the digits one through nine (0-9).

An exception will be thrown if s does not match one of the following regular expressions:

Leading and trailing white space characters are ignored.For specific culture informtion, see CultureInfo and NumberFormatInfo.

See Also

Double Structure | Double Members | System Namespace | Double.Parse Overload List