示例#1
0
        public static string GetFreeMemory()
        {
            var phav        = PerformanceInfo.GetPhysicalAvailableMemoryInMiB();
            var tot         = PerformanceInfo.GetTotalMemoryInMiB();
            var percentFree = phav / (decimal)tot * 100;

            return(percentFree.ToString("##.##"));
        }
示例#2
0
 public static string GetFreeMemoryMB() => PerformanceInfo.GetPhysicalAvailableMemoryInMiB().ToString();