|Manuals

Server.Dispose Method

Releases the resources used by the Server instance.

Description

This method implements the IDisposable interface and releases all unmanaged resources used by the Server class instance.

Syntax

public void Dispose();

Example

// Usage with using for automatic disposal
using (Server server = new Server())
{
    // Work with the server
    server.Save();
}
// Dispose is called automatically when exiting the using block

See Also