Share via


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

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

See Also

Reference

Dns Class

System.Net Namespace