Convert.ToUInt64 (Double) converts double-precision floating-point number to 64-bit unsigned integer.
Class Sample Public Shared Sub Main() Dim values() As Double = { Double.MinValue, -1.38e10, -12.98, _ 0, 9.113e-16, Double.MaxValue } Dim result As ULong For Each value As Double In values Try result = Convert.ToUInt64(value) Console.WriteLine(result) Catch e As OverflowException Console.WriteLine("The {0} value {1} is outside the range of the UInt64 type.", _ value.GetType().Name, value) End Try Next End Sub End Class