BigInteger::ToString Method ()
Converts the numeric value of the current BigInteger object to its equivalent string representation.
Assembly: System.Numerics (in System.Numerics.dll)
The ToString() method formats a BigInteger value in the "R", or round-trip, format of the current culture. If you want to specify a different format or culture, use the other overloads of the ToString method, as follows:
To use format | For culture | Use the overload |
|---|---|---|
Round-trip ("R") format | A specific culture | |
A specific format | Default (current) culture | |
A specific format | A specific culture |
The string representation of the BigInteger value includes a negative sign if its value is negative, and a sequence of digits ranging from 0 to 9 without leading zeros. The negative sign is defined by the NumberFormatInfo object for the current culture.
The following example displays a BigInteger value by using the default ToString() method. It also displays the string representations of the BigInteger value that results from using some standard format specifiers. The examples are displayed using the formatting conventions of the en-US culture.
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 4.0
Windows Phone
Available since 8.1