Get and set data to AppDomain : AppDomain : Assembly C# Examples


C# Examples » Assembly » AppDomain »

 

Get and set data to AppDomain









    
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);
                }
        }
}
    
   
  
   



Output

- d
  - c
  - f


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Assembly
» AppDomain