Imports System
Imports System.Net
Module Module1
Sub Main()
Try
Dim iphe As IPHostEntry
Dim addr As IPAddress
iphe = Dns.Resolve("www.microsoft.com")
For Each addr In iphe.AddressList
Console.WriteLine("AddressFamily: " + _
addr.AddressFamily.ToString())
Console.WriteLine("Address: " + _
addr.ToString())
Next
Catch ex As Exception
Console.WriteLine("Error: " + ex.ToString())
End Try
End Sub
End Module