It will not compile due to ` GOTO block` instead of ' goto block;', and even if it were right, it would not compile, because the C # specifications state (§8.9.3):
The purpose of the gotoidentifier operator is a label with the specified label. If the label with the given name does not exist in the current member of the function, or if the goto operator does not enter the label region, a compile-time error occurs. This rule allows the use of the goto statement to transfer control from a nested area, but not to a nested area.
Also I found a couple of specifications for me too:
goto finally (§8.10). goto finally, goto finally .
goto :
- goto try finally, > finally try. a > finally, > finally try. , try.
- goto.
,
try
{
...
goto Label1;
}
finally
{
CloseAll();
}
Label1:
MethodB();
CloseAll() Label1 MethodB().
, ...