CSharp examples for Operating System:Cpu
Get Cpu Id
using System.Management; using System;// w w w . j a v a2s .c om public class Main{ public static string GetCpuId() { var cpuInfo = string.Empty; var mc = new ManagementClass("win32_processor"); var moc = mc.GetInstances(); foreach (var o in moc) { var mo = (ManagementObject) o; cpuInfo = mo.Properties["processorID"].Value.ToString(); break; } return cpuInfo; } }