// 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.IO; using System.Collections; class MainClass { public static void Main(string[] args) { ArrayList list = new ArrayList(); StreamReader f = new StreamReader("C:\\test.dat"); string line; while((line = f.ReadLine()) != null) { list.Add(line); } f.Close(); for(int i = 0; i < list.Count; i++) { Console.WriteLine(list[i]); } } }