VB.Net by API/System.Net/IPHostEntry — различия между версиями

Материал из VB Эксперт
Перейти к: навигация, поиск
м (1 версия)
 
(нет различий)

Версия 16:40, 26 мая 2010

IPHostEntry.AddressList

  
Imports System.Net
Imports System.Net.Sockets

Public Class Tester
    Public Shared Sub Main

        Try
            Dim myIPHostEntry As IPHostEntry = Dns.Resolve("www.google.ru")
            Dim myIPAddresses() As IPAddress = myIPHostEntry.AddressList
            Dim myIPAddress As IPAddress
            Dim strIPAddressList As String
            For Each myIPAddress In myIPAddresses
                Console.WriteLine(myIPAddress.ToString)
            Next
        Catch ex As SocketException
            Console.WriteLine(ex.Message)
        End Try
    End Sub
End Class