Convert “1.79769313486232E+308” to double without OverflowException?

后端 未结 8 1333
暗喜
暗喜 2020-12-07 01:20

I have this string \"1.79769313486232E+308\" and am trying to convert it to a .NET numeric value (double?) but am getting the below exception. I am using Convert.ToDo

8条回答
  •  孤城傲影
    2020-12-07 01:42

    That number is too big for a double, as the exception says. You are going to have to find a large number library to handle that for you, as there is nothing that I know of in the .Net library that handles very large numbers.

提交回复
热议问题