コード例 #1
0
        public static string GetFreeMemory()
        {
            long arg_0B_0         = PerformanceInfo.GetPhysicalAvailableMemoryInMiB();
            long totalMemoryInMiB = PerformanceInfo.GetTotalMemoryInMiB();

            return((arg_0B_0 / totalMemoryInMiB * 100m).ToString("##.##"));
        }
コード例 #2
0
        public static string GetFreeMemory()
        {
            var phav        = PerformanceInfo.GetPhysicalAvailableMemoryInMiB();
            var tot         = PerformanceInfo.GetTotalMemoryInMiB();
            var percentFree = phav / (decimal)tot * 100;

            return(percentFree.ToString("##.##"));
        }
コード例 #3
0
        public static string GetUsedMemory()
        {
            long    arg_0B_0         = PerformanceInfo.GetPhysicalAvailableMemoryInMiB();
            long    totalMemoryInMiB = PerformanceInfo.GetTotalMemoryInMiB();
            decimal d = arg_0B_0 / totalMemoryInMiB * 100m;

            return((100m - d).ToString("##.##"));
        }
コード例 #4
0
 public static string GetFreeMemoryMB()
 {
     return(PerformanceInfo.GetPhysicalAvailableMemoryInMiB().ToString());
 }
コード例 #5
0
 public static string GetTotalMemory()
 {
     return(PerformanceInfo.GetTotalMemoryInMiB().ToString());
 }
コード例 #6
0
 public static string GetTotalMemory() => PerformanceInfo.GetTotalMemoryInMiB().ToString();