Imports System
Imports System.Text
Imports Microsoft.VisualBasic.Strings
Imports System.Numerics
Class MainClass
Public Shared Sub Main()
Dim positiveString As String = "9999999999999999999999999999999"
Dim negativeString As string = "-9999999999999999999999999999999"
Dim posBigInt As BigInteger = 0
Dim negBigInt As BigInteger = 0
Try
posBigInt = BigInteger.Parse(positiveString)
Console.WriteLine(posBigInt)
Catch e As FormatException
Console.WriteLine("Unable to convert the string '{0}' to a BigInteger value.",positiveString)
End Try
If BigInteger.TryParse(negativeString, negBigInt) Then
Console.WriteLine(negBigInt)
Else
Console.WriteLine("Unable to convert the string '{0}' to a BigInteger value.",negativeString)
End If
End Sub
End Class