// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.Collections; class MainClass { public static void Main(string[] args) { ArrayList list = new ArrayList(); list.Add("A"); list.Add("BB"); list.Add("CCC"); foreach(object o in list) Console.WriteLine(o); int ix_bb = list.IndexOf("BB"); Console.WriteLine(ix_bb); list.RemoveAt(ix_bb); foreach(object o in list) Console.WriteLine(o); } }