Ibrahim Najjar
Ibrahim Najjar

Reputation: 19423

Who is responsible for running multiple AppDomains in the same process?

I understand that multiple applications can run inside different AppDomains within the same process, and my question is: who is responsible for doing so, would the operating system do this on certain conditions, or is it the sole responsibility of the programmer to take advantage of such feature ?

Upvotes: 0

Views: 199

Answers (1)

Emond
Emond

Reputation: 50672

A .NET application can create AppDomains in the same (its own) process and load an executable into the AppDomain.

The OS will not do that for you as far as I know.

Use

var newDomain = AppDomain.CreateDomain("New Domain");
newDomain.ExecuteAssembly("MyApplication.exe");

Upvotes: 2

Related Questions