using System;
using System.Collections.Generic;
using System.Text;
using System.Management;
namespace Common
...{
public class GetPhysicsNum
...{
public string GetNetCardMacAddress()
...{
ManagementClass mc;
ManagementObjectCollection moc;
mc = new ManagementClass("Win32_NetworkAdapterConfiguration");
moc = mc.GetInstances();
string str = "";
foreach (ManagementObject mo in moc)
...{
if ((bool)mo["IPEnabled"] == true)
str = mo["MacAddress"].ToString();
}
return str;
}
/** <summary>
/// C盘序列号
/// </summary>
/// <returns></returns>