Try
xConn.ConnectionString = xConnBuilder.ConnectionString
xConn.Open()
Throw New Exception("Something")
Catch ex As Exception
Throw
Finally
If xConn.State = ConnectionState.Open Then
xConn.Close()
End If
End Try
What happens to the connection object after the exception is thrown and re-thrown maintaining the stack trace, is it closed, because the finally block is not reached in case of exception.
Finally block contains the code that must be executed no matter weather there was an error/exception or not.