Client.Disposing Event (Microsoft.DirectX.DirectPlay)

Warning: This event is deprecated. Deprecated components of Microsoft DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.

Occurs when the Dispose method is called or when the object is finalized and collected by the garbage collector of the Microsoft .NET common language runtime. Deprecated.


Visual Basic Public Event Disposing As EventHandlerLeave Site
C# public event EventHandlerLeave Site Disposing;
C++ public:
event EventHandlerLeave SiteDisposing;
JScript In JScript, you can use events, but you cannot define your own.


To add an event handler that listens for a Client.Disposing event, use the following code.

client.Disposing += new System.EventHandler(this.OnDisposing);

The Disposed property of an object indicates whether that object has been disposed.