Here is sample code remember to add system.net namespace
IPHostEntry ip = Dns.GetHostByName (“www.yahoo.com”);
IPAddress [] IpA = ipE.AddressList;
for (int i = 0; i < IpA.Length; i++)
{
Console.WriteLine (“IP Address {0}: {1} “, i, IpA[i].ToString ());
}