Here we go...
i just take one listbox control in my form named it "lboxDrives" ,then on one button named "Info" following code is written:
private void btnDriveInfo_Click(object sender, EventArgs e)
{
string[] GetDrives = Environment.GetLogicalDrives();
if (lboxDrives.Items.Count > 0)
return;
foreach (string item in GetDrives )
{
string drive;
drive = item;
DriveInfo GetInfo = new DriveInfo(item);
if (GetInfo.DriveType == DriveType.CDRom || GetInfo.DriveType == DriveType.Network)
{
continue;
}
long freeSpace = GetInfo.AvailableFreeSpace;
double freeSpaceinGB = freeSpace / (1024 * 1024 * 1024);
drive += "("+freeSpaceinGB+" GB Free)";
lboxDrives.Items.Add(drive);
}