Displaying System RAM in c#

  • Thread starter Thread starter Jonny
  • Start date Start date
J

Jonny

How do I display the system RAM in C# ?? Do I have to get
it from the Registry or is there a function for it?

If so how??

Thanks

/Jonny
 
Jonny,

You will want to use the classes in the System.Management namespace to
access the WMI providers. Basically, you want to query the system for all
instances of the Win32_PhysicalMemory WMI class. On that class, there is a
Capacity property you can use to get the memory for that particular board
(each instance of the Win32_PhysicalMemory WMI class will represent a
different memory board).

Hope this helps.
 
Thanks Nicholas,

I keep getting this error when I try to use the
system.management

The type or namespace name 'Management' does not exist in
the class or namespace 'System' (are you missing an
assembly reference?)

any idea's?

Am i missing something really obvious?

/Jonny
 
Back
Top