string[] fileList = Directory.GetFiles(@"c:\temp");Random random = new Random();string fileName = fileList[random.Next(fileList.Length)];StreamReader sr = File.OpenText(fileName);string contents = sr.ReadToEnd();
Copyright © 2006-2008 Corey Goldberg
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.