private static string GetCpuId()
{
string cpuInfo = " ";
using (ManagementClass cimobject = new ManagementClass("Win32_Processor"))
{
ManagementObjectCollection moc = cimobject.GetInstances();
foreach (ManagementObject mo in moc)
{
cpuInfo = mo.Properties["ProcessorId"].Value.ToString();
mo.Dispose();
}
}
return cpuInfo.ToString();
}
c# listbox多选设置 selectionmode属性 为multisimple