System.Net.IPHostEntry Class

Assembly: System.dll
Namespace: System.Net
Summary
Provides a container class for Internet host address information.
C# Syntax:
public class IPHostEntry
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.

Example
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.GetHostByName("www.contoso.com");
   

    
See also:
System.Net Namespace | Dns

System.Net.IPHostEntry Member List:

Public Constructors
ctor #1 Default constructor. This constructor is called by derived class constructors to initialize state in this type.
Public Properties
AddressList Read-write

Gets or sets a list of IP addresses associated with a host.
Aliases Read-write

Gets or sets a list of aliases associated with a host.
HostName Read-write

Gets or sets the DNS name of the host.
Public Methods
Equals
(inherited from System.Object)
See base class member description: System.Object.Equals

Derived from System.Object, the primary base class for all objects.
GetHashCode
(inherited from System.Object)
See base class member description: System.Object.GetHashCode

Derived from System.Object, the primary base class for all objects.
GetType
(inherited from System.Object)
See base class member description: System.Object.GetType

Derived from System.Object, the primary base class for all objects.
ToString
(inherited from System.Object)
See base class member description: System.Object.ToString

Derived from System.Object, the primary base class for all objects.
Protected Methods
Finalize
(inherited from System.Object)
See base class member description: System.Object.Finalize

Derived from System.Object, the primary base class for all objects.
MemberwiseClone
(inherited from System.Object)
See base class member description: System.Object.MemberwiseClone

Derived from System.Object, the primary base class for all objects.

Hierarchy:


System.Net.IPHostEntry Member Details

ctor #1
Summary:
Default constructor. This constructor is called by derived class constructors to initialize state in this type.
C# Syntax:
public IPHostEntry();

Return to top


Property: AddressList (read-write)
Summary
Gets or sets a list of IP addresses associated with a host.
C# Syntax:
public IPAddress[] AddressList {get; set;}

Return to top


Property: Aliases (read-write)
Summary
Gets or sets a list of aliases associated with a host.
C# Syntax:
public string[] Aliases {get; set;}

Return to top


Property: HostName (read-write)
Summary
Gets or sets the DNS name of the host.
C# Syntax:
public string HostName {get; set;}
Remarks
The IPHostEntry.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 IPHostEntry.Aliases property.

Return to top


Method: Equals(
   object obj
)
Inherited
See base class member description: System.Object.Equals
C# Syntax:
public virtual bool Equals(
   object obj
);

For more information on members inherited from System.Object click on the link above.

Return to top


Method: Finalize()
Inherited
See base class member description: System.Object.Finalize
C# Syntax:
~IPHostEntry();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetHashCode()
Inherited
See base class member description: System.Object.GetHashCode
C# Syntax:
public virtual int GetHashCode();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetType()
Inherited
See base class member description: System.Object.GetType
C# Syntax:
public Type GetType();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: MemberwiseClone()
Inherited
See base class member description: System.Object.MemberwiseClone
C# Syntax:
protected object MemberwiseClone();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: ToString()
Inherited
See base class member description: System.Object.ToString
C# Syntax:
public virtual string ToString();

For more information on members inherited from System.Object click on the link above.

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.