NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Application.AddOnApplicationExit

Adds an event handler for the Exit event.

[Visual Basic]
Public Shared Sub AddOnApplicationExit( _
   ByVal handler As EventHandler _
)
[C#]
public static void AddOnApplicationExit(
   EventHandler handler
);
[C++]
public: static void AddOnApplicationExit(
   EventHandler* handler
);
[JScript]
public static function AddOnApplicationExit(
   handler : EventHandler
);

Parameters

handler
An EventHandler delegate that represents the method that will handle the System.WinForms.Application.ApplicationExit event.

Remarks

You can use this event-handling method to dispose objects that the garbage collection did not reclaim, to close open files, or to do anything else that is required before an application stops running.

See Also

Application Class | Application Members | System.WinForms Namespace