(一).说明
取得设备网卡的MAC地址和硬盘的卷标号
(二).图片示例
(三).代码
using System;
using System.Management;namespace NetCard
{
/// <summary>
/// 读取设备
/// </summary>
public class run
{
private ManagementClass mc;
private ManagementObjectCollection moc;
private ManagementObject disk;
public run()
{}
/// <summary>
/// 取得设备网卡的MAC地址
/// </summary>
public string GetNetCardMacAddress()
{
mc = new ManagementClass("Win32_NetworkAdapterConfiguration");
moc = mc.GetInstances();
string str = "";
foreach(ManagementObje