Dns.EndGetHostEntry(IAsyncResult) Method

Definition

Ends an asynchronous request for DNS information.

C#
public static System.Net.IPHostEntry EndGetHostEntry(IAsyncResult asyncResult);

Parameters

asyncResult
IAsyncResult

An IAsyncResult instance returned by a call to an BeginGetHostEntry method.

Returns

An IPHostEntry instance that contains address information about the host.

Exceptions

asyncResult is null.

Remarks

This method blocks until the operation is complete.

The Aliases property of the IPHostEntry instance returned is not populated by this method and will always be empty.

To perform this operation synchronously, use a GetHostEntry method.

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

Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1