获取cpu唯一编号
发布网友
发布时间:2024-10-02 09:00
我来回答
共2个回答
热心网友
时间:2024-12-09 14:43
恩,上面的代码没错.只是取的东西不对.
public static ArrayList GetCPUId()
{
ArrayList IdList = new ArrayList();
ManagementClass cimobject = new ManagementClass("Win32_Processor");
ManagementObjectCollection moc = cimobject.GetInstances();
foreach (ManagementObject mo in moc)
{
IdList.Add(mo.Properties["ProcessorId"].Value.ToString());
}
return IdList;
}
应该取ProcessorId
热心网友
时间:2024-12-09 14:43
难道没有人知道吗?