Use ArrayList copy constructor : ArrayList : Data Structure C# Examples


C# Examples » Data Structure » ArrayList »

 

Use ArrayList copy constructor









    
using  System;
using  System.Collections;

class  MainClass
{
    public  static  void  Main()
    {
        ArrayList  myArrayList  =  new  ArrayList();

        myArrayList.Add("This");
        myArrayList.Add("is");
        myArrayList.Add("a");
        myArrayList.Add("test");

        ArrayList  anotherArrayList  =  new  ArrayList(myArrayList);

        Console.WriteLine(anotherArrayList);

    }

}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Data Structure
» ArrayList