So we all know that the following code will return a long:
DriveInfo myDrive = new DriveInfo("C:\\");
long size = myDrive.TotalSize;
Console.WriteLine("Drive Size is: {0}", size);
The output will be something like this:
Drive Size is: 114203439104
So I think this means that the drive has a total size of around 114 GigaBytes.
However, I want to get this into the following format:
114.2 MB
Is there a really quick and easy way of doing this?
Thanks in advance.