Edit

Share via


IPHostEntry Class

Definition

Provides a container class for Internet host address information.

public ref class IPHostEntry
public class IPHostEntry
type IPHostEntry = class
Public Class IPHostEntry
Inheritance
IPHostEntry

Examples

The following example queries the DNS database for information on the host www.contoso.com and returns the information in an IPHostEntry instance.

IPHostEntry^ hostInfo = Dns::GetHostEntry( "www.contoso.com" );
IPHostEntry hostInfo = Dns.GetHostEntry("www.contoso.com");
Dim hostInfo As IPHostEntry = Dns.GetHostEntry("www.contoso.com")

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()

Initializes a new instance of the IPHostEntry class.

Properties

AddressList

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

Aliases

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

HostName

Gets or sets the DNS name of the host.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also