Facebook
From Chocolate Crocodile, 6 Years ago, written in C#.
This paste is a reply to Zad1 from Michał Pacanowski - go back
Embed
Viewing differences between Zad1 and Re: Zad1
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
ConsoleApp1 3==D
{
    class Program
    {
        static void Main(string[] args)
        {
            DriveInfo[] disktab = DriveInfo.GetDrives();
            foreach (DriveInfo d in disktab)
            {
                Console.WriteLine("Adres napędzacza danych: {0}", d.Name);
                Console.WriteLine("Typ napędzacza: {0}", d.DriveType);
                if (d.IsReady == true)
                {
                    Console.WriteLine("Nazwa napędzacza danych: {0}", d.VolumeLabel);
                    Console.WriteLine("Systm plikorów: {0}", d.DriveFormat );
                    Console.WriteLine(
                        "Dostępne miejce do zapamiętywania:{0, 15} GB",
                        d.AvailableFreeSpace / 1024 / 1024 / 1024);

                    Console.WriteLine(
                        "Dostępne miejce do zapamiętywania i użycia:{0, 15} GB",
                        d.TotalFreeSpace / 1024 / 1024 / 1024);

                    Console.WriteLine(
                        "Cała objęctość miejca pamięci:            {0, 15} GB ",
                        d.TotalSize);
                }
                Console.WriteLine();
            }
          
          
        }
    }
}