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!

Radix.ToString

Returns a String representation of a specified number in a specified counting system (base).

[Visual Basic]
Public Shared Function ToString( _
   ByVal value As Long, _
   ByVal radix As Integer _
) As String
[C#]
public static string ToString(
   long value,
   int radix
);
[C++]
public: static String* ToString(
   __int64 value,
   int radix
);
[JScript]
public static function ToString(
   value : long,
   radix : int
) : String;

Parameters

value
the value to be converted to a string
radix
the number of the counting system (base) to which value is to be converted

Remarks

For base 10, no prefix is printed. For base 16, "0x" is prefixed to the number, for base 8, a "0" is prefixed to the number. For all other bases "nn#" is prefixed to the number (where nn is the two digit base). The rest of the String returned is made up of characters representing the magnitude. The following characters are used in the representation: 0123456789abcdefghijklmnopqrstuvwxyz (note that uppercase characters are NOT returned). If the radix is N, the first N characters in the listing just mentioned may be used in the representation. For negative values, the negative is carried over into the string, except for base 16 and 8, which have well defined rules for dealing with negative values.

Value Radix String
10 12 "12#a"
-10 16 "0xfffffffffffffff6"
-10 9 "-09#11"
16 16 "0x10"
-2 8 "01777777777777777777776"

See Also

Radix Class | Radix Members | System Namespace