Share via


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

IDisposable.Dispose()

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

See Also

Reference

DataConnection Class

Dispose Overload

Microsoft.VisualStudio.Data Namespace