On Visual Studio if I create a new Windows Form and put the following into the Form_Load event:
throw new Exception();
Nothing happens. I can put a breakpoint here and see that this line of code is reached, but no exception seems to be thrown. If I put the same statement into the click event of a button and the click the button, the program crashes as I would expect it to.
What is going on here?
Thanks
If you run it outside the debugger it is thrown. You need to configure the debugger to break on the un-handled exception.