This documentation is archived and is not being maintained. Finally Blocks

Visual Studio .NET 2003

A Finally block is always executed when execution leaves any part of the Try statement. No explicit action is required to execute the Finally block; when execution leaves the Try statement, the system will automatically execute the Finally block and then transfer execution to its intended destination. The Finally block is executed regardless of how execution leaves the Try statement: through the end of the Try block, through the end of a Catch block, through an Exit Try statement, through a GoTo statement, or by not handling a thrown exception.

It is invalid to explicitly transfer execution into a Finally block; it is also invalid to transfer execution out of a Finally block except through an exception.

FinallyStatement ::=
   Finally StatementTerminator
   [ Block ]

See Also Catch Blocks | 10.10.1 Structured Exception-Handling Statements | Try...Catch...Finally Statement (Visual Basic Language Reference)