DataConnection.Dispose Method
Disposes of the current data connection and all its associated resources.
Namespace: Microsoft.VisualStudio.Data
Assembly: Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)
Syntax
'Declaration
Public Sub Dispose
public void Dispose()
public:
virtual void Dispose() sealed
abstract Dispose : unit -> unit
override Dispose : unit -> unit
public final function Dispose()
Implements
Remarks
The connection can no longer be used once this method has been called. Clients should be sure to not call the Dispose method on a connection retrieved from the DataConnectionManager or any other mechanism where the client did not explicitly create the connection.
Trying to call the Dispose method on such a connection will throw an InvalidOperationException.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.