0

I am new in C#. I am trying to migrate a Java project in C#. the Java Runtime Class has been used for some memory calculation in the Java project. Is there any equivalent of the Runtime class in C# that can give me the same results?

I want to use the following sample code and metohds

Runtime rt = Runtime.getRuntime(); long total = rt.totalMemory(); long available = rt.freeMemory();

  • Does this answer your question? [How do you get total amount of RAM the computer has?](https://stackoverflow.com/questions/105031/how-do-you-get-total-amount-of-ram-the-computer-has) – Mikael Sep 09 '22 at 14:42
  • @Mikael `Runtime#totalMemory` and similar are about the availability memory of the JVM, not the system memory. – dan1st Sep 09 '22 at 14:50

0 Answers0