using System;
using System.Windows.Forms;
using System.IO;

namespace _ex_13_15
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            foreach (DriveInfo drv in DriveInfo.GetDrives())
                if (drv.IsReady == true)
                {
                    listBox1.Items.Add(drv.Name + " - total size: " + drv.TotalSize);

                    listBox1.Items.Add(drv.Name + " - free space: " + drv.AvailableFreeSpace);
                }
        }
    }
}