Code sample: copy one arraylist to another arraylist in C#

 
Following example describe about how to copy all elements of an arraylist to another arraylist in c# or how to Copy all contents of ArrayList to another ArrayList.

private void CopyArrayList()
    {
       System.Collections.ArrayList OriginalArrList = new System.Collections.ArrayList();
       System.Collections.ArrayList CopyArrayList = new System.Collections.ArrayList();
       OriginalArrList.Add("1234");
       OriginalArrList.Add("123");
       OriginalArrList.Add("12");
       OriginalArrList.Add("1");
       OriginalArrList.Add("xyz");
 
       CopyArrayList.Add(OriginalArrList.Clone());
     }

Author: Ankur

Have worked primarily in the domain of Calling, CRM and direct advertisers services. My technological forte is Microsoft Technologies especially Dot Net (Visual Studio 2003, 2005, 2008, 2010 and 2012) and Microsoft SQL Server 2000,2005 and 2008 R2. My Area of Expertise is in C#. Net, VB.Net, MS-SQL Server, ASP. Net, Silverlight, HTML, XML, Crystal Report, Active Reports, Infragistics, Component Art, ComponeOne, Lead Tools etc.