//NetworkInterface[] ni = NetworkInterface.GetAllNetworkInterfaces();
//for (int i = 0; i < ni.Length; i++)
//{
// UnicastIPAddressInformationCollection ip = ni[i].GetIPProperties().UnicastAddresses;
// for (int j = 0; j < ip.Count; j++)
// {
// Console.WriteLine(ip[j].Address);
// if (ip[j].Address.ToString() == vip)
// {
// Console.WriteLine(ip[j].Address);
// return true;
// }
// }
//}
.net core linux获取多个IP地址
最新推荐文章于 2022-12-09 12:48:58 发布