管道基础大数据平台系统开发-【CS】-ExportMap
13693261870
2023-08-24 58eee793bd48a558c275cac04ec576b7e6666b26
DataLoader/CS/Tools.cs
@@ -9,8 +9,6 @@
using System.Net.Sockets;
using System.Net;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace DataLoader.CS
{
@@ -47,7 +45,7 @@
        /// </summary>
        public static string FormatBytes(long bytes)
        {
            string[] Suffix = { "Byte", "KB", "MB", "GB", "TB" };
            string[] Suffix = { "B", "KB", "MB", "GB", "TB" }; // Byte
            int i = 0;
            double dblSByte = bytes;
@@ -55,7 +53,7 @@
                for (i = 0; (bytes / 1024) > 0; i++, bytes /= 1024)
                    dblSByte = bytes / 1024.0;
            return String.Format("{0:0.##}{1}", dblSByte, Suffix[i]);
            return string.Format("{0:0.##} {1}", dblSByte, Suffix[i]);
        }
        /// <summary>
@@ -68,9 +66,19 @@
                return 0.001;
            }
            String str = string.Format("{0:F3}", size / 1024.0 / 1024.0);
            string str = string.Format("{0:F3}", size / 1024.0 / 1024.0);
            return Double.Parse(str);
            return double.Parse(str);
        }
        /// <summary>
        /// 保留3位小数
        /// </summary>
        public static double Round3(double val)
        {
            string str = string.Format("{0:F3}", val);
            return double.Parse(str);
        }
        /// <summary>