语言

Dns.GetHostByAddress 方法

定义

获取 IP 地址的 DNS 主机信息。 这些方法现已过时。

重载

名称 说明
GetHostByAddress(IPAddress)
已过时.
已过时.
已过时.

IPHostEntry从指定的IPAddress实例创建实例。

GetHostByAddress(String)
已过时.
已过时.
已过时.

IPHostEntry从 IP 地址创建实例。

GetHostByAddress(IPAddress)

Source:
Dns.cs
Source:
Dns.cs
Source:
Dns.cs
Source:
Dns.cs
Source:
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时遇到错误。

注解

注释

在应用程序中启用网络跟踪时,此成员会发出跟踪信息。 有关详细信息,请参阅 .NET Framework 中的 Network Tracing。

适用于

GetHostByAddress(String)

Source:
Dns.cs
Source:
Dns.cs
Source:
Dns.cs
Source:
Dns.cs
Source:
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从 IP 地址创建实例。

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 地址。

注解

注释

在应用程序中启用网络跟踪时,此成员会发出跟踪信息。 有关详细信息,请参阅 .NET Framework 中的 Network Tracing。

适用于