Check out example codes for "c# drive info". It will help you in understanding the concepts better.

Code Example 1

foreach (var drive in DriveInfo.GetDrives())
            {
                double freeSpace = drive.TotalFreeSpace;
                double totalSpace = drive.TotalSize;
                double percentFree = (freeSpace / totalSpace) * 100;
                float num = (float)percentFree;

                Console.WriteLine("Drive:{0} With {1} % free", drive.Name, num);
                Console.WriteLine("Space Remaining:{0}", drive.AvailableFreeSpace);
                Console.WriteLine("Percent Free Space:{0}", percentFree);
                Console.WriteLine("Space used:{0}", drive.TotalSize);
                Console.WriteLine("Type: {0}", drive.DriveType);
            }

Learn ReactJs, React Native from akashmittal.com