string ipc = "";
            string AddressIP = string.Empty;
            foreach (IPAddress _IPAddress in Dns.GetHostEntry(Dns.GetHostName()).AddressList)
            {
                if (_IPAddress.AddressFamily.ToString() == "InterNetwork")
                {
                    AddressIP = _IPAddress.ToString();
                }
            }
            ipc = AddressIP;
            Console.WriteLine(ipc);

相关文章:

  • 2022-02-18
  • 2021-10-21
  • 2022-02-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-14
  • 2022-12-23
  • 2021-09-25
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案