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
Зворотний зв’язок
https://aka.ms/ContentUserFeedback.
Очікується незабаром: протягом 2024 року ми будемо припиняти використання механізму реєстрації проблем у GitHub для зворотного зв’язку щодо вмісту й замінювати його новою системою зворотного зв’язку. Докладніше:Надіслати й переглянути відгук про