BigInteger: ToString

ToString

Returns a human readable string of characters representing the number.



 Public Function ToString(
	  Optional ByRef Format As String,
	  Optional ByVal Provider As IFormatProvider ) As String

Parameters

Format
[ByRef] Optional. String. The specific numerical format wish to have the number displayed as.
Provider
[ByVal] Optional. IFormatProvider. An object that supplies culture-specific formatting information about this instance.

Return Values

String -  The numeric value of the number in the specified format.

Remarks

"X" and "x" for hex in either upper or lowercase. Everything else defaults to a decimal display.

The specifier can also contain a number of mininum digits to be displayed. If the value isnt long enough to reach the mininum digits, then leading 0's or FFs will be added to the beginning of the output.

 Dim b As BigInteger
 Set b = BInt(-200)
 Debug.Print b.ToString("d8") ' -00000200
 Debug.Print b.ToString("d")  ' -200
 Debug.Print b.ToString("x8") ' ffffff38
 Debug.Print b.ToString("x")  ' ff38
 

If no format is specified, the default of "d" is used.

See Also

Project CorLib Overview

Class BigInteger Overview