 |
IPHostEntry GetHostEntry IPv6 or IPv4 ? - Experts Exchange - The network for technology professional
In the foreach loop, you can check the AddressFamily property of each address and return the first IPv4 one found. On my system, that's actually the third one in the list. static private IPAddress GetIP() { IPAddress thisIp = null; string ...
www.experts-exchange.com |
 |