GetHostEntry Method
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Resolves a host name or IP address to an IPHostEntry instance.
Namespace: System.Net
Assembly: System (in System.dll)
Syntax
'Declaration
Public Shared Function GetHostEntry ( _
hostNameOrAddress As String _
) As IPHostEntry
public static IPHostEntry GetHostEntry(
string hostNameOrAddress
)
public:
static IPHostEntry^ GetHostEntry(
String^ hostNameOrAddress
)
static member GetHostEntry :
hostNameOrAddress:string -> IPHostEntry
public static function GetHostEntry(
hostNameOrAddress : String
) : IPHostEntry
Parameters
- hostNameOrAddress
Type: System. . :: . .String
The host name or IP address to resolve.
Return Value
Type: System.Net. . :: . .IPHostEntry
An IPHostEntry instance that contains address information about the host specified in hostNameOrAddress.
Remarks
The GetHostEntry method queries a DNS server for the IP address that is associated with a host name or IP address.
When an empty string is passed as the host name, this method returns the IPv4 addresses of the local host.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.