开发者

Exception in GUI thread causing vshost.exe to crash

I think my Visual Studio 2008 (.net 3.5) is corrupted.

If I start a new Windows Forms project in a new solution, add the co开发者_C百科de

double[] x = new double[2];
x[3] = -1.0;

to the form_load handler (or a button handler), and try to debug the program, it crashes immediately, not throwing an exception, but actually crashing.

If I put the same code in the form constructor or in Main, an exception gets thrown like normal.

Any ideas what might be going on?


Don't worry, your VS is fine.

The form load handler will (ultimately) be invoked from the Windows message loop, where exception handling is a little different. See here for more details.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜