public static string HumanReadableFilesize(double size) { string[] units = new string[] { "B", "KB", "MB", "GB", "TB", "PB" }; double mod = 1024.0; int i = 0; while (size >= mod) { size /= mod
http://www.myluoluo.com/c%E5%B0%86%E6%95%B0%E6%8D%AE%E5%A4%A7%E5%B0%8F%E5%AD%97%E8%8A%82%E8%BD%AC%E6%8D%A2%E4%B8%BAmb-gb-tb.love using System; using System.Collections.Generic; using System.Text; namespace ConvertDataSize { public class Convert { ///