string host = "www.microsoft.com";
//note that a host can have multiple IP addresses
IPAddress[] addresses = Dns.GetHostAddresses(host);
foreach (IPAddress addr in addresses)
{
Console.Write("\t{0}", addr);
}
www.microsoft.com
207.46.19.254 207.46.19.190
www.live.com
204.2.160.40 204.2.160.49
www.google.com
208.67.219.230 208.67.219.231
www.yahoo.com
209.131.36.158