whats an array list c# code example
Example 1: c# arraylist
ArrayList arrList = new ArrayList()
Example 2: arraylist in C#
// adding elements using ArrayList.Add() method
var arlist1 = new ArrayList();
arlist1.Add(1);
arlist1.Add("Bill");
arlist1.Add(" ");
arlist1.Add(true);
arlist1.Add(4.5);
arlist1.Add(null);
// adding elements using object initializer syntax
var arlist2 = new ArrayList()
{
2, "Steve", " ", true, 4.5, null
};