Dns.EndGetHostAddresses(IAsyncResult) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- asyncResult
- IAsyncResult
An IAsyncResult instance returned by a call to the BeginGetHostAddresses(String, AsyncCallback, Object) method.
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
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om