Convert.ToUInt64 (String) converts string to 64-bit unsigned integer. : Convert to UInt64 « Development « VB.Net






Convert.ToUInt64 (String) converts string to 64-bit unsigned integer.

  

Class Sample
   Public Shared Sub Main()

        Dim values() As String = { "One", "1.34e28", "-18", "-6.00", " 0", "137", Int32.MaxValue.ToString() }
        Dim result As ULong
        
        For Each value As String In values
           Try
              result = Convert.ToUInt64(value)
              Console.WriteLine(result)
           Catch e As Exception
              Console.WriteLine("Exception")
           End Try   
        Next                                 
    End Sub 
End Class 

   
    
  








Related examples in the same category

1.Convert.ToUInt64 (Boolean) converts Boolean to 64-bit unsigned integer.
2.Convert.ToUInt64 (Byte) converts 8-bit unsigned integer to 64-bit unsigned integer.
3.Convert.ToUInt64 (Char) converts Unicode character to 64-bit unsigned integer.
4.Convert.ToUInt64 (Decimal) converts decimal number to 64-bit unsigned integer.
5.Convert.ToUInt64 (Double) converts double-precision floating-point number to 64-bit unsigned integer.
6.Convert.ToUInt64 (Int16) converts 16-bit signed integer to 64-bit unsigned integer.
7.Convert.ToUInt64 (Int32) converts 32-bit signed integer to 64-bit unsigned integer.
8.Convert.ToUInt64 (Int64) converts 64-bit signed integer to 64-bit unsigned integer.
9.Convert.ToUInt64 (Object) converts object to a 64-bit unsigned integer.
10.Convert.ToUInt64 (SByte) converts 8-bit signed integer to 64-bit unsigned integer.
11.Convert.ToUInt64 (Single) converts single-precision floating-point number to 64-bit unsigned integer.
12.Convert.ToUInt64 (String, IFormatProvider) converts string to 64-bit unsigned integer using culture-specific format
13.Convert.ToUInt64 (String, Int32) converts string in a base to 64-bit unsigned integer.
14.Convert.ToUInt64 (UInt16) converts specified 16-bit unsigned integer to 64-bit unsigned integer.
15.Convert.ToUInt64 (UInt32) converts 32-bit unsigned integer to 64-bit unsigned integer.