可能重複:
C# - How do you get total amount of RAM the computer has?檢索的RAM總量的計算機上
下將檢索多少RAM,可用:
PerformanceCounter ramCounter;
ramCounter = new PerformanceCounter("Memory", "Available MBytes");
Console.WriteLine("Total RAM: " + ramCounter.NextValue().ToString() + " MB\n\n");
我們當然會必須使用System.Diagnostics;類。
性能計數器是否有任何功能來檢索特定機器的RAM數量?我不是在談論使用或未使用的RAM的數量。我正在談論機器的內存量。
檢查[this] [1]。 [1]:http://stackoverflow.com/questions/105031/c-sharp-how-do-you-get-total-amount-of-ram-the-computer-has – Shai
這有被回答在這裏:http://stackoverflow.com/questions/105031/c-sharp-how-do-you-get-total-amount-of-ram-the-computer-has – Softnux
是的,但沒有通過使用表現櫃檯類。我試圖從性能計數器類直接解決這個問題,而不是通過visual basic DLL。 –