2
Reply

As we know that Finally is called every time whether exception is thrown or not. But in what scenario even Finally is not called.

Brij Mishra

Brij Mishra

11y
1.6k
0
Reply

    I have already mentioned that we know, Finally is called every time whether exception is thrown or not but there are few scenarios where Finally is not called as well if there are following type of exception occurs in Try block,

    • System.ExecutionEngineException
    • System.StackOverflowException

    First exception occurs if there is problem while executing Garbage collection and the second exception occurs if there is no space left in stack to execute further.

    First exception also occurs if Environment.FailFast() called.

    when page state is changed inside try block.