///
/// 获取CPU的编号
///
/// CPU的编号
public static List GetCPUID()
{
List lstInfo =new List();
ManagementClass cimobject = new ManagementClass("Win32_Processor");
ManagementObjectCollection moc = cimobject.GetInstances();
foreach (Ma
本文实例讲述了C#编程获取各种电脑硬件信息的方法。分享给大家供大家参考,具体如下:
获取CPU编号:
ManagementClass mc = new ManagementClass("Win32_Processor");
ManagementObjectCollection moc = mc.GetInstances();
string strID = null ;
foreach( ManagementObject mo in moc )
{
strID = mo.Properties
本文实例讲述了C#获取机器码的方法。分享给大家供大家参考,具体如下:
using System.Runtime.InteropServices;
using System.Management;
using System;
public class HardwareInfo
{
//取机器名
public string GetHostName()
{
return System.Net.Dns.GetHostName();
}
//取CPU编号
public Str