Convert.ToString Method (Int64)

 

Converts the value of the specified 64-bit signed integer to its equivalent string representation.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

Public Shared Function ToString (
	value As Long
) As String

Parameters

value
Type: System.Int64

The 64-bit signed integer to convert.

Return Value

Type: System.String

The string representation of value.

This implementation is identical to Int64.ToString().

The following example converts each element in a long integer array to its equivalent string representation.

' Create a NumberFormatInfo object and set several of its
' properties that control default integer formatting.
Dim provider As New System.Globalization.NumberFormatInfo()
provider.NegativeSign = "minus "

Dim values() As Long = { -200, 0, 1000 }

For Each value As Long In values
   Console.WriteLine("{0,-6}  -->  {1,10}", _
                     value, Convert.ToString(value, provider))
Next
' The example displays the following output:
'       -200    -->   minus 200
'       0       -->           0
'       1000    -->        1000

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show: