2 using System.Security.Policy;
3 using System.Threading;
9 AppDomainSetup setup = new AppDomainSetup ();
10 setup.ApplicationBase = ".";
12 Console.WriteLine (AppDomain.CurrentDomain.FriendlyName);
14 AppDomain newDomain = AppDomain.CreateDomain ("NewDomain", new Evidence (), setup);
16 newDomain.SetData ("TEST", "a");
17 if ((string)newDomain.GetData ("TEST") != "a")
20 newDomain.SetData ("TEST", 1);
21 if ((int)newDomain.GetData ("TEST") != 1)
24 newDomain.SetData ("TEST", true);
25 if ((bool)newDomain.GetData ("TEST") != true)
28 newDomain.SetData ("TEST", false);
29 if ((bool)newDomain.GetData ("TEST") != false)
32 int [] ta = { 1, 2, 3 };
33 newDomain.SetData ("TEST", ta);
35 int [] ca = (int [])newDomain.GetData ("TEST");
37 if (ca [0] != 1 || ca [1] != 2 || ca [2] != 3)