前端之家收集整理的这篇文章主要介绍了
[VB.NET]关于数据接口咨询,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
关于数据接口咨询 Imports System.Data Imports System.Data.
sqlClient Imports System.ComponentModel Public Class DataBase Implements IDisposable Private
sqlConn As
sqlConnection Public Shared sConn As String = "Persist Security Info=False;Integrated Security=SSPI;database=hrmbook;server=localhost;Connect Timeout=30 " Public Sub Dispose() Implements System.IDisposable.Dispose Dispose(True) GC.SuppressFinalize(True) End Sub Protected Sub Dispose(ByVal disposing As Boolean) If disposing <> True Then Return End If If
sqlConn Is Nothing = False Then
sqlConn.Dispose()
sqlConn = Nothing End If End Sub End Class 才开始学vb.net上面这句不是太理解,希望那位大哥大姐帮忙解释解释 Implements IDisposable ? GC.SuppressFinalize(True) ? __________________________________________________________________________ up __________________________________________________________________________ Implements IDisposable 意思是 DataBase类实现接口 IDisposable GC.SuppressFinalize(True) 是
垃圾回收的意思 __________________________________________________________________________
原文链接:https://www.f2er.com/vb/264001.html