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.FromString

Converts a specified String to a Double.

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

Parameters

s
A string represention of a Double value.

Return Value

The Double value represented by the specified string.

Exceptions

Exception Type Condition
ArgumentNullException If the string is a null reference (in Visual Basic Nothing).
FormatException If the number is not formatted correctly.

Remarks

This method will not throw an OverflowException. Instead, it returns PositiveInfinity or NegativeInfinity if the number is too large or too small.

This method does a round-trip, to and returned to ToString, because it uses the invariant NumberFormatInfo. Use the Parse method for parse user-dependent or locale-specific strings The default (locale-neutral) NumberFormatInfo is used. (For addition inforamtion about cultures, see CultureInfo.)

The s parameter returns an expected format that is produced as if Format(format, sp) were called with the general ('G') format character and the invariant NumberFormatInfo.

See Also

Double Structure | Double Members | System Namespace | String | Format