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.ToString (Double)

Creates a String representation of the specified Double value.

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

Parameters

d
The Double value to be converted to a String representation.

Return Value

A string representation of the specified Double value.

Remarks

The string representation produced does not depend upon the user's settings. Format calls the arguments as if Format(Double d, String format, NumberFormatInfo info). where d is for number, format for the general format ('G') character, and info the invariant NumberFormatInfo. (For addition information about cultures, see CultureInfo.)

To create user-dependent or locale-specific strings, use the Format method with an appropriate NumberFormatInfo object. The following conditions apply:

If d is a Double value, which is not equal to NaN, then d = = FromString is true.

If d is a Double value, such that either-10-17 < d <=-10-4 or 10-4 < = d < 1017, then the result will be a string in the format discussed below (e.g., 0.42 is represented as "0.42"):

The representation always uses the least number of digits required to represent the Double value.

If d is a Double value, such that either | d | < 10-4 or | d | > = 1017, then the result will be a string in exponential format as discussed below (e.g., 0.00001234 is represented as "1.234E-5"):

The representation always uses the least number of digits required to represent the Double value, in both the mantissa and the exponent.

If d is a Double value equal to NaN, PositiveInfinity, or NegativeInfinity, the result will be "NaN", "Infinity", or "-Infinity", respectively.

See Also

Double Structure | Double Members | System Namespace | Double.ToString Overload List | String