Dns.GetHostEntry resolves a host name or IP address to an IPHostEntry instance.
Imports System.IO
Imports System.Net
Imports System.Text
publicclass MainClass
Shared Sub Main()
Dim hostName As String = ""
Dim host as IPHostEntry = Dns.GetHostEntry(hostname)
Console.WriteLine("GetHostEntry(" + hostname + ") returns: ")
Dim ip As IPAddress() = host.AddressList
Dim index As Integer
For index = 0 To ip.Length - 1
Console.WriteLine(ip(index))
Next index
End Sub
End Class