问题描述
当我在 C# 应用程序中从 form_load 抛出异常时,它在平台为 x64 时不起作用.(它在 x86 上按预期运行)
When I throw an exception from form_load in my C# application it doesn't work when the platform is x64. (it acts as expected for x86)
当我单步执行代码时,我会到达抛出异常的那一行,然后它会立即跳转到 timer_Tick.
When I step through the code, I get to the line where the exception it thrown, then it immediately jumps to timer_Tick.
当我创建一个新项目并将这一行添加到 form_load 时:throw new System.Exception("哎呀!");
When I create a new project and add this line to form_load:throw new System.Exception("oops!");
对于 x86,它会按预期崩溃.对于 x64,它不会崩溃.
For x86 it crashes as expected. For x64 it doesn't crash.
有什么方法可以让应用程序在 64 位上从 form_load 实际抛出?
Is there some way to get an application to actually throw from form_load on 64-bit?
推荐答案
没关系.貌似这掉进了MS已知bug的黑洞里……
Nevermind. Looks like this fell into the black hole of MS known bugs...
这篇关于x64 的 form_load 中忽略的异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!