This documentation is archived and is not being maintained.

IPHostEntry Class

Provides a container class for Internet host address information.

For a list of all members of this type, see IPHostEntry Members.


[Visual Basic]
Public Class IPHostEntry
public class IPHostEntry
public __gc class IPHostEntry
public class IPHostEntry

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


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.


[Visual Basic, C#, C++] The following example queries the DNS database for information on the host and returns the information in an IPHostEntry instance.

[Visual Basic] 
Dim hostInfo As IPHostEntry = Dns.GetHostByName("")

IPHostEntry hostInfo = Dns.GetHostByName("");

IPHostEntry* hostInfo = Dns::GetHostByName(S"");

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.


Namespace: System.Net

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

Assembly: System (in System.dll)

See Also

IPHostEntry Members | System.Net Namespace | Dns