string strHostName = System.Net.Dns.GetHostName;string strIPAddress = null;System.Net.IPAddress[] objAddressList = System.Net.Dns.GetHostEntry(strHostName).AddressList;for (x = 0; x <= objAddressList.GetUpperBound(0); x++) { if (objAddressList(x).AddressFamily == Net.Sockets.AddressFamily.InterNetwork) { strIPAddress = objAddressList(x).ToString; }}
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)