Hi Alex,
What is the Finally used for if it is always executed? Just place the Finally code after the End Try.
What I was trying to determine if the try command had a way to execute code if no errors occurred.
I am a beginner in Vb .net.
Thanks
Roland
===========================================================================
>>The Try,Catch,Finally documentation states
>>
>>Execution enters the Try...Catch...Finally block with the statement block following the Try statement. If Visual Basic completes this block without an exception being generated, it looks for the optional Finally statement at the end.
>>
>>-
>>-
>>
>>No matter what happens, the Finally block is always the last code to be executed before leaving Try...Catch...Finally.
>>
>>
>>My question is: Does the Finally block get executed if a catch is executed?
>>
>>Reading the above is confusing!
>>
>>Thanks
>>Roland
>
>AFAIK, yes it is, no matter what.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only