C# / Csharp ArrayList example

A quick overview to show the usage of arralylist in C#.

Example:

using System; using System.Collections; class ArrayListExample { public static void Main() { ArrayList obj = new ArrayList(); //Observation: using add method to add elements in the list obj.Add(52); obj.Add(63); obj.Add(21); obj.Add(110); obj.Add(72); foreach (int i in obj) Console.WriteLine(i); Console.ReadLine(); } }

Output: [...]