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