string [] drives = Directory.GetLogicalDrives(); foreach (string str in drives) { System.Console.WriteLine(str); }