2020
10-30
10-30
c# 获取计算机硬件信息的示例代码
///<summary>///获取CPU的编号///</summary>///<returns>CPU的编号</returns>publicstaticList<string>GetCPUID(){List<string>lstInfo=newList<string>();ManagementClasscimobject=newManagementClass("Win32_Processor");ManagementObjectCollectionmoc=cimobject.GetInstances();foreach(ManagementObjectmoinmoc){stringcpuInfo=mo.Properties["ProcessorId"].Value.ToString();//cpu...
继续阅读 >