Mono Class Library: System Namespace

System.AppDomain Class

Represents an application domain, which is an isolated environment where applications execute. [Edit]

See Also: AppDomain Members

System.Object
     System.MarshalByRefObject
          System.AppDomain

[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
[System.Runtime.InteropServices.ComDefaultInterface(typeof(System._AppDomain))]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class AppDomain : MarshalByRefObject, _AppDomain, System.Security.IEvidenceFactory

Thread Safety

All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.

Remarks

Application domains, which are represented by AppDomain objects, provide isolation, unloading, and security boundaries for executing managed code.

Multiple application domains can run in a single process; however, there is not a one-to-one correlation between application domains and threads. Several threads can belong to a single application domain, and while a given thread is not confined to a single application domain, at any given time, a thread executes in a single application domain.

Application domains are created using the CreateDomain method. AppDomain instances are used to load and execute assemblies (System.Reflection.Assembly). When a AppDomain is no longer in use, it can be unloaded.

The AppDomain class implements a set of events to enable applications to respond to the following conditions:

ConditionEvent
An assembly was loaded. AppDomain.AssemblyLoad
An application domain will be unloaded. AppDomain.DomainUnload
An unhandled exception was thrown. AppDomain.UnhandledException
[Edit]

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0