如何获取本机的本地连接mac

NetworkInterface[] netWorks = NetworkInterface.GetAllNetworkInterfaces();
foreach (NetworkInterface netWork in netWorks)
{
    if (netWork.Name=="本地连接")
    {
        MessageBox.Show(netWork.GetPhysicalAddress().ToString()); 
    }
}
原文地址:https://www.cnblogs.com/xinzheng/p/4523666.html