判断网络地址是否是自动获取

foreach (System.Net.NetworkInformation.NetworkInterface f in System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces())
{
    if (f.OperationalStatus == System.Net.NetworkInformation.OperationalStatus.Up)
    {
        var i = f.GetIPProperties().DhcpServerAddresses.Count;
    }
}
原文地址:https://www.cnblogs.com/xinzheng/p/12837847.html