Table of Contents

Class IPHostEntry

Namespace
System.Net
Assembly
System.Net.dll

Provides a container class for Internet host address information.

public class IPHostEntry
Inheritance
IPHostEntry
Inherited Members
Extension Methods

Remarks

The IPHostEntry class associates a Domain Name System (DNS) host name with an array of aliases and an array of matching IP addresses.

The IPHostEntry class is used as a helper class with the Dns class.

Constructors

IPHostEntry()

public IPHostEntry()

Properties

AddressList

Gets or sets a list of IP addresses that are associated with a host.

public IPAddress[] AddressList { get; }

Property Value

IPAddress[]

An array of type IPAddress that contains IP addresses that resolve to the host names that are contained in the Aliases property.

HostName

Gets or sets the DNS name of the host.

public string HostName { get; }

Property Value

string

A string that contains the primary host name for the server.

Remarks

The HostName property contains the primary host name for a server. If the DNS entry for the server defines additional aliases, they will be available in the Aliases property.