tags:

views:

22

answers:

2

how can i calculate the total disc space available + free space + used space in the DVD/CD inserted in f-drive.. and display the result on the label...

A: 

Use GetDriveInfo from the FileSystem class. You need to reference the Microsoft.VisualBasic DLL.

Timores
Or just use DriveInfo.GetDrives(), that way you don't have to reference the VB library.
Mattias S
A: 
using System.IO;

DriveInfo fDrive = new DriveInfo(@"F:\");
Console.WriteLine(fDrive.AvailableFreeSpace);
Console.WriteLine(fDrive.TotalSize);

For other properties, check this link to MSDN

Veer