在Form1_Load里不报错,你试试?
你确定代码 xx = 1 / yy; 运行时不崩溃?
新建一个winform工程, 在Form1_Load里写如下代码,执行无报错, this.Text = "111"; int xx; int yy; yy = 0; xx = 1 / yy; int[] x = new int[2]; x[44] = 445; this.Text = "222";
this.Text = "111"; int xx; int yy; yy = 0; xx = 1 / yy; int[] x = new int[2]; x[44] = 445; this.Text = "222";
如果不会抛出异常,那肯定是调用栈的上一层捕获了啊。
111,094
社区成员
642,554
社区内容
加载中
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧