0
        private static string FormatBytes(long bytes)
        {
        string[] Suffix = { "B", "KB", "MB", "GB", "TB" };
        int i;
        double dblSByte = bytes;
        for (i = 0; i < Suffix.Length && bytes >= 1024; i++, bytes /= 1024)
         {
            dblSByte = bytes / 1024.0;
         }
        return "" + dblSByte;
        }

I have this code to make bytes into the all the values in Suffix. I just can't figure out how to force showing this in GB (like 500 mb = something like 0,5gb & 1,1tb shows 1100gb) Can someone help me out with this one?

Ando
  • 19
  • 6

0 Answers0