Get all logical drives : Drive : File Directory Stream C# Examples


C# Examples » File Directory Stream » Drive »

 

Get all logical drives









    
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);
        }

    }
}
    
   
  
   



Output

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


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo File Directory Stream
» Drive