Get all logical drives : Drive « File Directory Stream « C# / CSharp Tutorial






using System;
using System.IO;

class MaionClass
{
  public static void Main(String[] args)
  {
    string[] drives = Directory.GetLogicalDrives();
    Console.WriteLine("Here are your drives:");
    foreach(string s in drives)
    {
      Console.WriteLine("--> {0}", s);
    }

  }
}
Here are your drives:
--> C:\
--> D:\








15.14.Drive
15.14.1.List all drives
15.14.2.Get all logical drives
15.14.3.DriveInfo: name, type, format and available free space
15.14.4.DriveInfo App