Consider the console application below, featuring a method with a generic catch handler that catches exceptions of type TException
.
When this console ap
This is a known issue that is caused by a bug in the CLR. It has been fixed in CLR 4.0 (as yet unreleased).
Thanks to JaredPar for the assistance with this. See comments on his answer for more detail and link to the original bug report on Microsoft Connect.
That's weird indeed. I verified the problem also exists with VB.Net so it's not a C# specific issue. It will need to be confirmed by the core debugger team but it does look like a bug.
Please file a bug on Connect and post the bug number as a comment to my OP so that I can make sure it gets routed to the correct team.