I don\'t have a problem; I\'m just curious. Imagine the following scenario:
foreach (var foo in list)
{
try
{
//Some code
}
catch (E
Here is a reliable source:
A continue statement cannot exit a finally block (Section 8.10). When a continue statement occurs within a finally block, the target of the continue statement must be within the same finally block; otherwise, a compile-time error occurs.
It is taken from MSDN, 8.9.2 The continue statement.
The documentation say that:
The statements of a finally block are always executed when control leaves a try statement. This is true whether the control transfer occurs as a result of normal execution, as a result of executing a break, continue, goto, or return statement, or as a result of propagating an exception out of the try statement. If an exception is thrown during execution of a finally block, the exception is propagated to the next enclosing try statement. If another exception was in the process of being propagated, that exception is lost. The process of propagating an exception is discussed further in the description of the throw statement (Section 8.9.5).
It is from here 8.10 The try statement.