Does finally block always executes regardless of whether or not an exception occurs in the associated try block?
Exceptions in c#
In c# if, I define an exception then will it be derived directly or indirectly from System.Exception class?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Jul 27, 2012, 2:13 PM
The finally block always executes regardless of whether there's an exception or not, except in the case of certain 'fatal' exceptions.
Check my post to this recent thread for an example of the latter:
http://www.c-sharpcorner.com/Forums/Thread/181054/try-catch-finally.aspx