0
我已經使用瞭如下的oracle連接。關閉oracle連接
using (OracleConnection connection = OracleHelper.GetConnection(this.ConnectionStringKey))
{
//some code
}
該連接需要手動關閉,或者在執行該功能時關閉此連接?
我已經使用瞭如下的oracle連接。關閉oracle連接
using (OracleConnection connection = OracleHelper.GetConnection(this.ConnectionStringKey))
{
//some code
}
該連接需要手動關閉,或者在執行該功能時關閉此連接?
Dispose
將在連接超出範圍時調用連接,因此連接將自動關閉。
這就是有using
聲明的全部觀點。