How to concatenate two ArrayList in C# .Net

Last Reply on Mar 02, 2015 05:09 AM By Shashikant

Posted on Mar 02, 2015 04:41 AM

How to Concatinate the two ArrayList and Store the Data into Third ArrayList,Dynamically ?

Posted on Mar 02, 2015 05:09 AM Modified on on Mar 12, 2015 02:58 AM

Please Refer the below code:

Namespace

using System.Collections;

C#

protected void Page_Load(object sender, EventArgs e)
{
    ArrayList arrayList1= new ArrayList();
    arrayList1.Add("1");
    arrayList1.Add("2");
    arrayList1.Add("3");
    ArrayList arrayList2 = new ArrayList();
    arrayList2.AddRange(arrayList1);
    ArrayList arrayList3 = new ArrayList();
    arrayList3.AddRange(arrayList2);
    string Number = arrayList3[1].ToString();
}