'Finally' cannot appear outside a 'Try' statement
Finally
is used to complete a Try...Catch...Finally
block; hence it can only appear once at the end of the block. Either you have an unnecessary Finally
, or your Finally
statement appears outside the bounds of its corresponding Try
block.
Error ID: BC30382
Locate and remove the unnecessary
Finally
statement.Move the
Finally
statement to the appropriate location in your code.
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET feedback
.NET is an open source project. Select a link to provide feedback: