How can i get the cpu information in .net?


Question

like whether it is pentium or AMD etc.

1
18
2/21/2013 8:28:41 PM

Please note that this is from VS2003:

using(ManagementObjectSearcher win32Proc = new ManagementObjectSearcher("select * from Win32_Processor"),         
    win32CompSys = new ManagementObjectSearcher("select * from Win32_ComputerSystem"),
        win32Memory = new ManagementObjectSearcher("select * from Win32_PhysicalMemory"))
            {
                foreach (ManagementObject obj in win32Proc.Get())
                {
                    clockSpeed = obj["CurrentClockSpeed"].ToString();
                    procName = obj["Name"].ToString();
                    manufacturer = obj["Manufacturer"].ToString();
                    version = obj["Version"].ToString();
                }
12
8/24/2014 7:54:18 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon