Imports System.Net
Imports System.Net.Sockets
Public Class Tester
Public Shared Sub Main
Dim hostEntry As IPHostEntry
Dim addrList As IPAddress()
Dim i As Integer
Dim strTemp As String
Try
hostEntry = Dns.Resolve("68.178.206.138")
addrList = hostEntry.AddressList
For i = 0 To addrList.Length - 1
Console.WriteLine(addrList(i).ToString)
Next
Catch ex As SocketException
Console.WriteLine(ex.StackTrace.ToString)
End Try
End Sub
End Class
|