Friday, September 10th, 2010

Get driveinfo using fileinfo in c#

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);
 
 
    }
}
Share Article/Example:
  • DotNetKicks
  • DZone
  • StumbleUpon
  • Print
  • Add to favorites
  • Digg
  • del.icio.us
  • Twitter
  • Facebook
  • LinkedIn
  • Posterous
  • Slashdot

Readers Comments (0)




Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.


Latest Additions

Popular User Submitted Links

1


Hosted & Optimized JS Libraries – Cached Commons

1


Multi-File Uploader & Resizer – Agile Uploader

1


Open source online notebook-to-do-list manager

1


3 tier app design in silverlight using azure & RIA services

1


Polymaps – A JS Library For Image & Vector-Tiled Maps

eXTReMe Tracker