使用 C # ,我想得到我的计算机所拥有的内存总量。 使用 PerformanceCounter,我可以通过设置:
counter.CategoryName = "Memory";
counter.Countername = "Available MBytes";
但我似乎找不到一种方法来获取总的记忆量。我该怎么做呢?
更新:
MagicKat: I saw that when I was searching, but it doesn't work - "Are you missing an assembly or reference?". I've looked to add that to the References, but I don't see it there.