共用方式為


Dns.EndGetHostByName(IAsyncResult) 方法

定義

警告

EndGetHostByName is obsoleted for this type, please use EndGetHostEntry instead. https://go.microsoft.com/fwlink/?linkid=14202

警告

EndGetHostByName has been deprecated. Use EndGetHostEntry instead.

警告

EndGetHostByName is obsoleted for this type, please use EndGetHostEntry instead. http://go.microsoft.com/fwlink/?linkid=14202

結束 DNS 資訊的非同步要求。

public:
 static System::Net::IPHostEntry ^ EndGetHostByName(IAsyncResult ^ asyncResult);
[System.Obsolete("EndGetHostByName is obsoleted for this type, please use EndGetHostEntry instead. https://go.microsoft.com/fwlink/?linkid=14202")]
public static System.Net.IPHostEntry EndGetHostByName (IAsyncResult asyncResult);
[System.Obsolete("EndGetHostByName has been deprecated. Use EndGetHostEntry instead.")]
public static System.Net.IPHostEntry EndGetHostByName (IAsyncResult asyncResult);
[System.Obsolete("EndGetHostByName is obsoleted for this type, please use EndGetHostEntry instead. http://go.microsoft.com/fwlink/?linkid=14202")]
public static System.Net.IPHostEntry EndGetHostByName (IAsyncResult asyncResult);
public static System.Net.IPHostEntry EndGetHostByName (IAsyncResult asyncResult);
[<System.Obsolete("EndGetHostByName is obsoleted for this type, please use EndGetHostEntry instead. https://go.microsoft.com/fwlink/?linkid=14202")>]
static member EndGetHostByName : IAsyncResult -> System.Net.IPHostEntry
[<System.Obsolete("EndGetHostByName has been deprecated. Use EndGetHostEntry instead.")>]
static member EndGetHostByName : IAsyncResult -> System.Net.IPHostEntry
[<System.Obsolete("EndGetHostByName is obsoleted for this type, please use EndGetHostEntry instead. http://go.microsoft.com/fwlink/?linkid=14202")>]
static member EndGetHostByName : IAsyncResult -> System.Net.IPHostEntry
static member EndGetHostByName : IAsyncResult -> System.Net.IPHostEntry
Public Shared Function EndGetHostByName (asyncResult As IAsyncResult) As IPHostEntry

參數

asyncResult
IAsyncResult

IAsyncResult 執行個體,呼叫 BeginGetHostByName(String, AsyncCallback, Object) 方法時傳回。

傳回

IPHostEntry 物件,包含關於主機的 DNS 資訊。

屬性

例外狀況

asyncResultnull

備註

這個方法會封鎖直到作業完成為止。

若要同步執行這項作業,請使用 GetHostByName 方法。

Ipv6Element.Enabled如果 屬性設定true為 ,Aliases則這個方法不會填入傳回之IPHostEntry實例的 屬性,而且一律是空的。

注意

當您在應用程式中啟用網路追蹤時,此成員會發出追蹤資訊。 如需詳細資訊,請參閱 .NET Framework 中的網路追蹤

適用於

另請參閱