小编Spa*_*ven的帖子

c#System.OverflowException

所以这是我的代码:

static void Main(string[] args)
{
    Console.WriteLine("How many numbers are you going to enter?");

    long num = long.Parse(Console.ReadLine());

    long[] nums = new long[num];
}
Run Code Online (Sandbox Code Playgroud)

当我为"num"输入10000000000时,我得到了

"System.OverflowException算术运算导致溢出."

我该怎么做才能解决这个问题?

c# math long-integer

1
推荐指数
1
解决办法
254
查看次数

标签 统计

c# ×1

long-integer ×1

math ×1