When CLR loads first to execute managed code, it creates 3 application domains. System and Shared domains are singleton for each CLR.
- It creates and Shared and default application Domains.
- It Loads Mscorlib.dll (class library for system namespace) into shared domain.
Creation of default Exception instances (OutOfMemoryException, StackOverFlowException and FatalExecutionException): the reason to create these exceptions in advance is that in case of above exceptions to be raise system needs to creates instance and memory, but say if it is outofmemory exception then there will be no space to instantiate exception instance.
- It keeps track all the domains in the process and manage them by loading or unloading AppDomains.
- It contains mscorlib.dll
- It contains basic system types like class, array, struct etc.
- It contains user code and resources for only this app domain.
- Name of default domain is name of executable.