SqlCeConnection.Dispose Method

Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.

Releases all the unmanaged resources used by the SqlCeConnection and optionally releases the managed resources.

  [Visual Basic]
  Public Overridable Sub Dispose() Implements IDisposable.Dispose

  [C#]
  public virtual void Dispose();
[C++]
public: virtual void Dispose();
[JScript]
public function Dispose();

Implements

IDisposable.Dispose

Remarks

This method is called by the public method and the Finalize() method. Dispose() invokes the protected Dispose(Boolean) method with the disposing parameter set to true. Finalize() invokes Dispose with disposing set to false.

When the disposing parameter is true, this method releases all resources held by any managed objects that this SqlCeConnection references. This method involkes the Dispose() method of each referenced object.

For more information about Dispose and Finalize, see Cleaning Up Unmanaged Resources and Overriding the Finalize Method.

The Dispose method calls Close.

Requirements

Platforms: .NET Compact Framework

.NET Framework Security:

See Also

SqlCeConnection Class | SqlCeConnection Members | System.Data.SqlServerCe Namespace

Syntax based on .NET Framework version 1.1.
Documentation version 1.1.1.

Send comments on this topic.

© Microsoft Corporation. All rights reserved.