Before you start executing the code, the CLR creates three application domains: SystemDomain, SharedDomain, and DefaultDomain. The last one is an instance of the AppDomain class and the only named domain.
The picture below shows the contents of each domain:
As far as I understand, SystemDomain is designed for loading and unloading AppDomains, it stores a pool of process lines and various information about each domain.
SharedDomain is more like an AppDomain and contains code for domain-independent assemblies.
AppDomain - our application.
Actually, the question is: What is a domain? If these are isolated sections in which the code is executed and various data are stored, how do they physically look? The CLR cannot break the process memory as it wants - the process has a specific structure defined by the OS. It is also not clear which assemblies are loaded into the SharedDomain. Should I specifically like to indicate that the assembly needs to be loaded into the SharedDomain or all / some assemblies are loaded by default there? How does the interaction with the assembly code in SharedDomain occur?
