Imports System.Numerics
Imports System
Module Example
Public Sub Main()
Dim singles() As Single = { Single.MinValue, -1.430955172e03, 2.1111111111e05,
Single.MaxValue, Single.PositiveInfinity,
Single.NegativeInfinity, Single.NaN }
Dim number As BigInteger
For Each value As Single In singles
Try
number = CType(value, BigInteger)
Console.WriteLine("{0,37} {1,37}", value, number)
Catch e As OverflowException
Console.WriteLine("{0,37} {1,37}", value, "OverflowException")
End Try
Next
End Sub
End Module