Create DriveInfo object from FullName of FileInfo : File Info : File Stream C# Source Code


Custom Search

C# Source Code » File Stream » File Info »

 

Create DriveInfo object from FullName of FileInfo








    


using System;
using System.IO;

class MainClass {
    static void Main(string[] args) {
        FileInfo file = new FileInfo("c:\\a.txt");

        // Display drive information.
        DriveInfo drv = new DriveInfo(file.FullName);

        Console.Write("Drive: ");
        Console.WriteLine(drv.Name);

    }
}
           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo File Stream
» File Info