Using System;
Using Sytem.Net;
namespace BuilderExamples {
class BuilderIPAddress {
static void Main(string[] args) {
try {
IPHostEntry iphe = Dns.Resolve("www.microsoft.com");
foreach (IPAddress addr in iphe.AddressList) {
Console.WriteLine("AddressFamily: " + addr.AddressFamily.ToString());
Console.WriteLine("Address: " + addr.ToString());
} } catch (Exception e) {
Console.WriteLine("Error: " + e.ToString());
} } } }