2 using System.Reflection;
4 public class Test : MarshalByRefObject
6 public DateTime Stamp = new DateTime (1968, 1, 2);
8 public static int Main ()
10 var setup = new AppDomainSetup();
11 setup.ApplicationBase = System.Environment.CurrentDirectory;
13 AppDomain d = AppDomain.CreateDomain ("foo", AppDomain.CurrentDomain.Evidence, setup);
15 Test t = (Test) d.CreateInstanceAndUnwrap (Assembly.GetExecutingAssembly().FullName, typeof (Test).FullName);
16 t.Stamp = new DateTime (1968, 1, 3);
17 Console.WriteLine (t.Stamp);