79561491

Date: 2025-04-08 08:03:34
Score: 1
Natty:
Report link
private static string FormatBytes(long bytes)
{
    string[] sizes = { "B", "KB", "MB", "GB", "TB", "PB" };
    var order = 0;

    while (bytes >= 1024 && order < sizes.Length - 1)
    {
        order++;
        bytes /= 1024;
    }

    return $"{bytes:0.##} {sizes[order]}";
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: GOSTRAFX