c# 读取mck码

private List<string> GetMac()
{
List<string> macs = new List<string>();
try
{
var mc = new ManagementClass("Win32_NetworkAdapterConfiguration");
var moc = mc.GetInstances();
foreach (var mo in moc)
{
if (!(bool)mo["IPEnabled"])
continue;
var mac = mo["MacAddress"].ToString();
macs.Add(mac);
}
}
catch
{
}
return macs;
}

上一篇:【pytorch】关于Embedding和GRU、LSTM的使用详解


下一篇:ucGUI的学习小结