3 ms·
C# does not allow returns from a `finally` block, which has annoyed me at times. However, seeing the consequences of allowing the behavior realized in this arti
by whoisthemachine 5y ago
C# does not allow returns from a `finally` block, which has annoyed me at times. However, seeing the consequences of allowing the behavior realized in this article, I am happy for the rule.
- masklinn 5y ago> C# does not allow returns from a `finally` block I think C# does not allow any flow control in finally blocks, so no continue or break either (well for continue and break they're allowed if the statement they "refer to" is also in the finally block, but flow control can't go through or escape from the block). Essentially in C# a finally block can only be escaped from by falling off of the block's end.