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






AppDomain.CreateDomain

  

using System;
using System.Reflection;
using System.Collections;

class MainClass
{
    public static void Main() 
    {
        AppDomain domain = AppDomain.CreateDomain("Test");

        ArrayList list = new ArrayList();
        list.Add("d");
        list.Add("c");
        list.Add("f");

        domain.SetData("Pets", list);

        foreach (string s in (ArrayList)domain.GetData("Pets"))
        {
            Console.WriteLine("  - " + s);
        }
    }
}

   
    
  








Related examples in the same category

1.AppDomain.CreateInstance
2.AppDomain.CreateInstanceAndUnwrap
3.AppDomain.CreateInstanceFromAndUnwrap
4.AppDomain.CurrentDomain.FriendlyName
5.AppDomain.CurrentDomain
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