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