Close an open database connection.
Calling this method closes a connection to a SQL Server or releases the connection back to the connection pool. The System.Data.SqlClient.SqlConnection state is set to closed.Calling Close on a System.Data.SqlClient.SqlConnection instance that is not currently open is acceptable; no exception is raised.
If there are any pending transactions, they will be rolled back.
Namespace: System.Data.SqlClient
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0