ServerConnection コンストラクター
ServerConnection クラスの新しいインスタンスを初期化します。
名前空間: Microsoft.SqlServer.Management.Common
アセンブリ: Microsoft.SqlServer.ConnectionInfo (Microsoft.SqlServer.ConnectionInfo.dll)
構文
'宣言
Public Sub New
'使用
Dim instance As New ServerConnection()
public ServerConnection()
public:
ServerConnection()
new : unit -> ServerConnection
public function ServerConnection()
説明
このコンストラクタは、この型の状態を初期化するために、派生クラスのコンストラクタによって呼び出されます。
使用例
'Connect to the local, default instance of SQL Server.
Dim srv As Server
srv = New Server
'The connection is established when a property is requested.
Console.WriteLine(srv.Information.Version)
'The connection is automatically disconnected when the Server variable goes out of scope.