Mono Class Library: System.Net.Dns Overview | MembersSystem.Net.Dns.GetHostByName Method |
Queries DNS for address information about the specified host. [Edit]
|
A System.Net.IPHostEntry object containing host information for the address specified in hostName . [Edit]
Type Reason System.Net.DnsPermission [Edit] Requires unrestricted permission for accessing DNS information. See System.Net.DnsPermission and System.Security.Permissions.PermissionState.Unrestricted.
Type Reason ArgumentNullException hostName is null . [Edit] System.Net.Sockets.SocketException An error was encountered executing the DNS query . [Edit] System.Security.SecurityException The caller does not have permission to access DNS information. [Edit]
Note:[Edit]To retrieve host information asynchronously, use the Dns.BeginGetHostByName(string, AsyncCallback, object) and Dns.EndGetHostByName(IAsyncResult) methods.
See the System.Net.IPHostEntry class page for an example that uses the Dns.GetHostByName(string) method.
Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0