예제 #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();