Catch block not catching exception

后端 未结 4 1834
你的背包
你的背包 2020-12-09 14:17

I have a child form that is throwing an ApplicationException in the Load event handler (intentionally for testing purposes). The parent form wraps the ChildForm.Show() meth

4条回答
  •  眼角桃花
    2020-12-09 14:43

    The new window has its own thread, which is doing its own loading. To verify this, you can try putting in a Thread.Sleep for a few seconds into Form2_Load before the exception. Your main thread window should continue execution before you hit the exception.

提交回复
热议问题