Export (0) Print
Expand All

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
[C#]
public static IPHostEntry GetHostByAddress(
 string address
);
[C++]
public: static IPHostEntry* GetHostByAddress(
 String* address
);
[JScript]
public static function GetHostByAddress(
   address : String
) : IPHostEntry;

Parameters

address
A string that represents an IP address.

Return Value

An IPHostEntry instance.

Exceptions

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.

Requirements

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

Show:
© 2014 Microsoft