var addressList = Dns.GetHostEntry(System.Net.Dns.GetHostName()).AddressList;
nativeIp = addressList.FirstOrDefault(address => address.AddressFamily == Sockets.AddressFamily.InterNetwork)?.ToString();
使用上面的代码,一直都只有1个本地IP 127.0.0.1
该怎么修改才能获取到DHCP分配的地址