在一起,就像增加非常大的数字在VB.NET
8767657654576576546675676567656765676576567676789876567898765456897654567876545678765456787656789876567898765678000000000022222222222222222
和
8765487654876548765487654876547876545678765478765478654567876567876545678765456786
你知道这是怎么可能得到一个正常大的纯文本answer is either too small or too large to convert to decimal
我的代码:
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Dim value1 As String = message.Text
Dim value2 As String = mykey.Text
Dim total = Convert.ToDecimal(value1) + Convert.ToDecimal(value2)
sum.Text = String.Format("{0:n0}", total)
End Sub
没有得到错误号
是,使用'System.Numerics.BigInteger ' – Rob
它是一个导入或我添加到昏暗total = System.Numerics.BigInteger(value1)+ System.Numerics.BigInteger(value2) – alan7811
这是一个类,所以你要导入'System.Numerics',然后使用它通过'新的BigInteger' – Rob