/*-------------------------------------------
//Author:Tang
//Create Date: 09-09-16
-------------------------------------------*/
using System;
using System.Management;
public class Sample
{
public static void Main()
{
ManagementObjectSearcher s =
new ManagementObjectSearcher("SELECT * FROM Win32_Processor");
// for get all CPU info ,using the get() method of Searcher
// get() return all CPUs collection
foreach (ManagementObject cpu in s.Get())
{
// show each cpu's Infomation
foreach (PropertyData pd in cpu.Properties)
{
Console.WriteLine(pd.Name+"/"+pd.Type+"/"+pd.Value);
//show each Propertie's Name, Type and Value of current cpu
};
}
}
}