try catch finally question

The finally block (nearly) always executes, whether or not there was an exception.

I say nearly because there are a few cases where finally isn’t guaranteed to be called:

Furthermore, even if the finally block is entered if a ThreadAbortException occurs just as the thread enters the finally block the code in the finally block will not be run.

There may be some other cases too…

Leave a Comment