This documentation is archived and is not being maintained.

AppDomain.DomainUnload Event

Occurs when an AppDomain is about to be unloaded.

[Visual Basic]
Public Overridable Event DomainUnload As EventHandler
public virtual event EventHandler DomainUnload;
public: virtual __event EventHandler* DomainUnload;

[JScript] In JScript, you can handle the events defined by a class, but you cannot define your own.

Event Data

The event handler receives an argument of type EventArgs.


The EventHandler delegate for this event can perform any termination activities before the application domain is unloaded.

To register an event handler for this event, you must have the permissions described in the Permissions section. If you do not have the appropriate permissions, a SecurityException occurs.

For more information about handling events, see Consuming Events.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Common Language Infrastructure (CLI) Standard

.NET Framework Security: 

See Also

AppDomain Class | AppDomain Members | System Namespace