public string[] getIPList(string hostName) { /* This method is created by Anton Zamov.web site: http://zamov.online.fr Feel free to use and redistribute this method in condition that you keep this message intact. */ IPHostEntry IpEntry=new IPHostEntry(); int counter = 0; string[] strResult=new string[100]; try { foreach(IPAddress Ip in iphostentry.AddressList) { strResult[counter++]=Ip.ToString(); } } catch(Exception exc) { // TODO } return strResult; }