This documentation is archived and is not being maintained.

Dns.GetHostByAddress Method (String)

.NET Framework 1.1

Creates an IPHostEntry instance from an IP address.

[Visual Basic]
Overloads Public Shared Function GetHostByAddress( _
   ByVal address As String _
) As IPHostEntry
public static IPHostEntry GetHostByAddress(
 string address
public: static IPHostEntry* GetHostByAddress(
 String* address
public static function GetHostByAddress(
   address : String
) : IPHostEntry;


A string that represents an IP address.

Return Value

An IPHostEntry instance.


Exception Type Condition
ArgumentNullException address is a null reference (Nothing in Visual Basic).
SocketException An error is encountered when resolving address.
FormatException address is not a valid IP address.
SecurityException The caller does not have permission to access DNS information.


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, Common Language Infrastructure (CLI) Standard

.NET Framework Security: 

See Also

Dns Class | Dns Members | System.Net Namespace | Dns.GetHostByAddress Overload List