public static string NameToIP(string name) { IPAddress[] ips = Dns.GetHostByName(name).AddressList; return ips[0].ToString(); }