Mono Class Library: System.AppDomain Overview | MembersSystem.AppDomain.Unload Method |
Unloads the specified application domain. [Edit]
|
Type Reason ArgumentNullException domain is null. [Edit] CannotUnloadAppDomainException domain could not be unloaded. [Edit]
If the thread that invoked AppDomain.Unload(AppDomain) is running in domain, another thread is started to perform the unload operation. If domain cannot be unloaded, a CannotUnloadAppDomainException is thrown in that thread, not the original thread that invoked AppDomain.Unload(AppDomain). However, if the thread that invoked AppDomain.Unload(AppDomain) is running outside domain, that is the thread that receives the exception.
The threads in domain are terminated using the System.Threading.Thread.Abort(object) method, which throws the thread an instance of System.Threading.ThreadAbortException.
Note: Although the thread should terminate promptly, it can continue executing for an unbounded amount of time in its finally clause.[Edit]
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0