Mega Code Archive

 
Categories / C# / File Stream
 

Illustrates the Directory class 2

/* Mastering Visual C# .NET by Jason Price, Mike Gunderloy Publisher: Sybex; ISBN: 0782129110 */  /*   Example15_6.cs illustrates the Directory class */ using System; using System.IO; public class Example15_6  {   public static void Main()    {     // get the files from the root directory     string[] aFiles = Directory.GetFiles("c:\\");     // and display them     foreach (string s in aFiles)       Console.WriteLine(s);   } }