G
Guest
I know that a connection is not closed when it goes out of scope so I would
usually code a Try...Finally block. But does Using...End Using achieve the
same?
i.e. is the following code overkill?
Using _connection As New SqlClient.SqlConnection
_connection.Open()
Try
Finally
_connection.Close()
End Try
End Using
usually code a Try...Finally block. But does Using...End Using achieve the
same?
i.e. is the following code overkill?
Using _connection As New SqlClient.SqlConnection
_connection.Open()
Try
Finally
_connection.Close()
End Try
End Using