AppDomain.CurrentDomain : AppDomain « System « C# / C Sharp by API






AppDomain.CurrentDomain

  
using System;

class MainClass
{
    public static void Main(string[] args)
    {
        if (AppDomain.CurrentDomain.FriendlyName != "NewAppDomain")
        {
            AppDomain domain = AppDomain.CreateDomain("NewAppDomain");

            domain.ExecuteAssembly("MainClass.exe", null, args);
        }

        foreach (string s in args)
        {
            Console.WriteLine(AppDomain.CurrentDomain.FriendlyName + " : " + s);
        }
    }
}

   
    
  








Related examples in the same category

1.AppDomain.CreateDomain
2.AppDomain.CreateInstance
3.AppDomain.CreateInstanceAndUnwrap
4.AppDomain.CreateInstanceFromAndUnwrap
5.AppDomain.CurrentDomain.FriendlyName
6.AppDomain.DefineDynamicAssembly
7.AppDomain.DoCallBack
8.AppDomain.DomainUnload
9.AppDomain.FriendlyName
10.AppDomain.GetAssemblies
11.AppDomain.GetData
12.AppDomain.OnUnhandledException
13.AppDomain.ProcessExit
14.AppDomain.SetData
15.AppDomain.SetPrincipalPolicy
16.AppDomain.Unload