Would you like to tell me that All code inside Finally block is guaranteed to execute irrespective of whether an exception occurs in the Protected block or not?
Finally block in C#
Hi friends,
Would you like to tell me that All code inside Finally block is guaranteed to execute irrespective of whether an exception occurs in the Protected block or not?
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 Dec 18, 2011, 5:33 AM
Some exceptions are fatal and you won't even get to the catch block, let alone the finally block. Consider this program for example which generates a stack overflow exception: