In VB.NET, if you return a value from the Catch
, will the Finally
code still execute?
For instance (I've generalized this code a bit):
Try
response = Client.doRequest()
Catch ex As Exception
'Request threw an error - Fatal failure.
InsertErrorLog(ex)
Return False
Finally
DisposeClient()
End Try
I need to ensure that DisposeClient()
is executed all of the time. Because I am returning out of the Catch
, will the Finally
still be executed?