Is it possible to get the size of system available memory in C#.NET? if yes how?
Is it possible to get the size of system available memory in C#.NET? if yes how?
var performance = new System.Diagnostics.PerformanceCounter("Memory", "Available MBytes");
var memory = performance.NextValue();
A piece of codes:
System.Diagnostics.PerformanceCounter ramCounter;
ramCounter = new System.Diagnostics.PerformanceCounter("Memory", "Available Bytes"); //"Available MBytes" for MB
string getAvailableRAMInBytes = ramCounter.NextValue() + "byte";