C#得到CPU的序列号、硬盘序列号、网卡序列号
时间:2011-03-06 来源:观海看云
}
retrun _HDInfo;
}
//获取网卡硬件地址
public static void GetMacAddress()
{
string _MacAddress = "";
ManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration");
ManagementObjectCollection moc2 = mc.GetInstances();
foreach (ManagementObject mo in moc2)
{
if ((bool)mo["IPEnabled"] == true)
MacAddress = mo["MacAddress"].ToString();
mo.Dispose();
}
return _MacAddress;
}
相关阅读 更多 +