ChocoPM.Converters.LongSizeToFileSizeString.StrFormatByteSize C# (CSharp) Method

StrFormatByteSize() public static method

Converts a numeric value into a string that represents the number expressed as a size value in bytes, kilobytes, megabytes, or gigabytes, depending on the size.
public static StrFormatByteSize ( long filesize ) : string
filesize long The numeric value to be converted.
return string
        public static string StrFormatByteSize(long filesize)
        {
            var sb = new StringBuilder(16);
             NativeMethods.StrFormatByteSize(filesize, sb, sb.Capacity);
             return sb.ToString();
        }