Table of Contents

Class Dns

Namespace
System.Net
Assembly
System.Net.dll

Provides simple domain name resolution functionality.

public static class Dns
Inheritance
Dns
Inherited Members

Methods

GetHostEntry(string)

Resolves a host name or IP address to an IPHostEntry instance.

public static IPHostEntry GetHostEntry(string hostNameOrAddress)

Parameters

hostNameOrAddress string

The host name or IP address to resolve.

Returns

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.