i want write on console infor of memory include installed ram and usable ram: ex: installe memory: 4,00 GB(3,80 GB usable). currently, i did get "installe memory: 4,00 GB"
public static void GetInstalledMemoryInfor()
{
ObjectQuery query = new ObjectQuery("SELECT Capacity FROM Win32_PhysicalMemory");
ManagementObjectSearcher mos = new ManagementObjectSearcher(query);
UInt64 capacity = 0;
foreach (ManagementObject WmiObject in mos.Get())
{
capacity += (UInt64)WmiObject["Capacity"];
}
Console.WriteLine(String.Format("Installed memory (RAM): {0:N} GB", capacity / (1024 * 1024 * 1024)));
}
how to get usable ram ? thanks 4 help me?