specify the drive
C#
2
Posts
2
Posters
0
Views
1
Watching
-
how can show the drives with memory and to install an application in particular drive
naveen
You may check free space of any drive by using an object of System.IO.DriveInfo class. Therefore following line will provide you free disk space provided on c drive- System.IO.DriveInfo dr= new System.IO.DriveInfo("C:\\"); long FreeSpace= dr.AvailableFreeSpace; In case if you need to know about all logical drives available on a system, you may use Environment.GetLogicalDrives() method. This will return you a string array containing all logical drives available on a system. Such as – string[] drives = Environment.GetLogicalDrives(); I hope this helps. -Dave.
Dave Traister, ComponentOne LLC. www.componentone.com