Mono Class Library: System.Net.Dns Overview | Members

System.Net.Dns.EndGetHostByName Method

Ends an asynchronous query to obtain address information about the specified host. [Edit]

[System.Obsolete("Use EndGetHostEntry instead")]
public static IPHostEntry EndGetHostByName (IAsyncResult asyncResult)

Parameters

asyncResult
The IAsyncResult object that holds the state information for the asynchronous operation. [Edit]

Returns

A System.Net.IPHostEntry object containing DNS address information about a host. [Edit]

Exceptions

TypeReason
ArgumentNullExceptionasyncResult is null. [Edit]

Remarks

This method blocks if the asynchronous operation has not completed.

The Dns.EndGetHostByName(IAsyncResult) method completes an asynchronous request for DNS information that was started with a call to Dns.BeginGetHostByName(string, AsyncCallback, object). The object specified for the asyncResult parameter is required to be the same object as was returned by the Dns.BeginGetHostByName(string, AsyncCallback, object) method call that began the request.

If the Dns.EndGetHostByName(IAsyncResult) method is invoked via the AsyncCallback delegate specified to the Dns.BeginGetHostByName(string, AsyncCallback, object) method, the asyncResult parameter is the IAsyncResult argument passed to the delegate's method.

[Edit]

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0