How can we manage C# finally block process
Can it is possible,I have a doubt in a mind i want in exception handling finally block never excuted ,whatever exception come or not in both condition but it is necessary finally block mustv be defind in your code.
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Jignesh TrivediRank #16 · 50.3K reputationPosted Jul 5, 2012, 8:07 PM EDT
Finnaly block not is call if and only if exception type is StackOverflowException or ExecutingEngineException.
can you please share the in which finally block is not called.
thx.
VulpesRank #55 · 29.2K reputationPosted Jul 5, 2012, 11:57 PM EDT
try/catch compiles and works fine with or without a finally block but, if there is a finally block, then it will be executed whether there's an exception or not except if the exception is one of the 'fatal' ones which Jignesh has enumerated.