public static string GetFreeMemory() { var phav = PerformanceInfo.GetPhysicalAvailableMemoryInMiB(); var tot = PerformanceInfo.GetTotalMemoryInMiB(); var percentFree = phav / (decimal)tot * 100; return(percentFree.ToString("##.##")); }
public static string GetTotalMemory() => PerformanceInfo.GetTotalMemoryInMiB().ToString();
public static string GetFreeMemoryMB() => PerformanceInfo.GetPhysicalAvailableMemoryInMiB().ToString();