Mono Class Library: System.Net.Dns Overview | Members

System.Net.Dns.GetHostByAddress Method

Queries DNS for the DNS host name of the specified IP address. [Edit]

[System.Obsolete("Use GetHostEntry instead")]
public static IPHostEntry GetHostByAddress (string address)

Parameters

address
A string containing an IP address. [Edit]

Returns

A System.Net.IPHostEntry instance containing the host information. [Edit]

Permissions

TypeReason
System.Net.DnsPermission [Edit] Requires unrestricted permission for accessing DNS information. See System.Net.DnsPermission and System.Security.Permissions.PermissionState.Unrestricted.

Exceptions

TypeReason
ArgumentNullExceptionaddress is null . [Edit]
FormatExceptionaddress is not a valid IP address. [Edit]
System.Net.Sockets.SocketExceptionAn error was encountered executing the DNS query . [Edit]
System.Security.SecurityExceptionThe caller does not have permission to access DNS information. [Edit]

Remarks

The IP address specified by the address parameter is required to be in dotted-quad notation (for example, "192.168.1.2"). [Edit]

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0