I need the code or the definition of the method getAvailableRam
used in C# to find the memory usage of the computer.
Asked
Active
Viewed 68 times
-1

prakruti
- 1
- 1
-
1See [http://stackoverflow.com/questions/750574/how-to-get-memory-available-or-used-in-c](this post) for more info – Chris O Mar 26 '11 at 13:46
-
2There are no functions in C#, there are methods, every method belongs to a class, and every class belongs to a DLL or an application. Where did you take this method name from? Where does it belong? Who wrote it? – Ilya Kogan Mar 26 '11 at 13:46
1 Answers
0
class Program
{
static void Main()
{
var ramCounter = new PerformanceCounter("Memory", "Available MBytes");
Console.WriteLine("{0} Mb", ramCounter.NextValue());
}
}

Darin Dimitrov
- 1,023,142
- 271
- 3,287
- 2,928