語言

Dns.GetHostByAddress 方法

定義

取得 IP 位址的 DNS 主機資訊。 這些方法現在已過時。

多載

名稱 Description
GetHostByAddress(IPAddress)
已淘汰.
已淘汰.
已淘汰.

從 IPHostEntry 指定的 IPAddress建立一個實例。

GetHostByAddress(String)
已淘汰.
已淘汰.
已淘汰.

從 IP 位址建立一個 IPHostEntry 實例。

GetHostByAddress(IPAddress)

來源:
Dns.cs
來源:
Dns.cs
來源:
Dns.cs
來源:
Dns.cs
來源:
Dns.cs

警告

GetHostByAddress has been deprecated. Use GetHostEntry instead.

警告

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

警告

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

從 IPHostEntry 指定的 IPAddress建立一個實例。

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

參數

address
IPAddress

IPAddress。

傳回

一個 IPHostEntry 例子。

屬性

例外狀況

address 是 null。

當解析 address時會遇到錯誤。

備註

Note

當您在應用程式中啟用網路追蹤時,該成員會發出追蹤資訊。 欲了解更多資訊,請參閱.NET框架中的網路追蹤。

適用於

GetHostByAddress(String)

來源:
Dns.cs
來源:
Dns.cs
來源:
Dns.cs
來源:
Dns.cs
來源:
Dns.cs

警告

GetHostByAddress has been deprecated. Use GetHostEntry instead.

警告

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

警告

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

從 IP 位址建立一個 IPHostEntry 實例。

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

參數

address
String

一個 IP 位址。

傳回

一個 IPHostEntry 例子。

屬性

例外狀況

address 是 null。

當解析 address時會遇到錯誤。

address 不是有效的 IP 位址。

備註

Note

當您在應用程式中啟用網路追蹤時,該成員會發出追蹤資訊。 欲了解更多資訊,請參閱.NET框架中的網絡追蹤。

適用於