Dns.EndGetHostAddresses(IAsyncResult) Dns.EndGetHostAddresses(IAsyncResult) Dns.EndGetHostAddresses(IAsyncResult) Dns.EndGetHostAddresses(IAsyncResult) Method

Definition

Ends an asynchronous request for DNS information.

public:
 static cli::array <System::Net::IPAddress ^> ^ EndGetHostAddresses(IAsyncResult ^ asyncResult);
public static System.Net.IPAddress[] EndGetHostAddresses (IAsyncResult asyncResult);
static member EndGetHostAddresses : IAsyncResult -> System.Net.IPAddress[]
Public Shared Function EndGetHostAddresses (asyncResult As IAsyncResult) As IPAddress()

Parameters

Returns

An array of type IPAddress that holds the IP addresses for the host specified by the hostNameOrAddress parameter of BeginGetHostAddresses(String, AsyncCallback, Object).

Remarks

The BeginGetHostAddresses method queries a DNS server for the IP addresses associated with a host name. If hostNameOrAddress is an IP address, this address is returned without querying the DNS server.

If an empty string is passed as the hostNameOrAddress argument, then this method returns the IPv4 and IPv6 addresses of the local host.

Note

This member emits trace information when you enable network tracing in your application. For more information, see Network Tracing in the .NET Framework.

Applies to