ChocoPM.Converters.LongSizeToFileSizeString.StrFormatByteSize C# (CSharp) 메소드

StrFormatByteSize() 공개 정적인 메소드

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.
리턴 string
        public static string StrFormatByteSize(long filesize)
        {
            var sb = new StringBuilder(16);
             NativeMethods.StrFormatByteSize(filesize, sb, sb.Capacity);
             return sb.ToString();
        }