Dispose Method

When overridden in a derived class, the Dispose method of the SqlCollectionBase class implements the Dispose method of the IDisposable interface for classes that inherit from SqlCollectionBase.

Remarks

The Dispose method closes the SqlDataReader object associated with the collection instance if it is not already closed and then calls the System.GC.SuppressFinalize method to avoid the overhead of finalizing.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security