1 
 2 /// <summary>
 3 /// 释放资源
 4 /// </summary>
 5 public void Dispose() 
 6 {
 7     // 确认连接是否已经关闭
 8     if (objConnection != null
 9     {
10         if (objConnection.State != ConnectionState.Closed) 
11         { 
12             objConnection.Close(); 
13         } 
14         objConnection.Dispose(); 
15         objConnection = null
16     }                
17 }

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-20
  • 2022-02-24
  • 2021-12-02
  • 2021-12-05
猜你喜欢
  • 2021-06-02
  • 2022-12-23
  • 2021-11-04
  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案