Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Unloads the specified application ___domain.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public Shared Sub Unload ( _
___domain As AppDomain _
)
public static void Unload(
AppDomain ___domain
)
public:
static void Unload(
AppDomain^ ___domain
)
static member Unload :
___domain:AppDomain -> unit
public static function Unload(
___domain : AppDomain
)
Parameters
- ___domain
Type: System. . :: . .AppDomain
An application ___domain to unload.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | ___domain is null Nothing nullptr unit a null reference (Nothing in Visual Basic) . |
CannotUnloadAppDomainException | ___domain could not be unloaded. |
Exception | An error occurred during the unload process. |
Remarks
Note
In some cases, calling Unload causes an immediate CannotUnloadAppDomainException, for example if it is called in a finalizer.
The threads in ___domain are terminated using the Abort method, which throws a ThreadAbortException in the thread. Although the thread should terminate promptly, it can continue executing for an unpredictable amount of time in a finally clause.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.