我想知道如何添加一个文本框,按每个地址/行的新行显示MAC地址。
所以它看起来像这样:
ManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration");
ManagementObjectCollection moc = mc.GetInstances();
string MACAddress = "";
foreach (ManagementObject mo in moc)
{
if (mo["MacAddress"] != null)
{
MACAddress = mo["MacAddress"].ToString();
MessageBox.Show(MACAddress);
}
}