Export (0) Print
Expand All

IPAddress.Address Property

NOTE: This property is now obsolete.

An Internet Protocol (IP) address.

Namespace: System.Net
Assembly: System (in system.dll)

'Declaration
<ObsoleteAttribute("This property has been deprecated. It is address family dependent. Please use IPAddress.Equals method to perform comparisons. http://go.microsoft.com/fwlink/?linkid=14202")> _
Public Property Address As Long
'Usage
Dim instance As IPAddress
Dim value As Long

value = instance.Address

instance.Address = value
/** @property */
public long get_Address ()

/** @property */
public void set_Address (long value)

public function get Address () : long

public function set Address (value : long)

Not applicable.

Property Value

The long value of the IP address.

This property is obsolete. Use GetAddressBytes.

To convert Address to dotted-quad notation, use the ToString method.

The following example uses the Address parameter to retrieve the IP address of the IPAddress instance.


Public Sub PrintAddress(IpAddressString As [String])
    ' Creates an instance of the IPAddress' for the specified IP string in dotted-quad notation.
    Dim hostIPAddress As IPAddress = IPAddress.Parse(IpAddressString)
    Console.WriteLine(ControlChars.Cr + "The IP address '" + IpAddressString + "' is {0}", hostIPAddress.ToString())
End Sub 'PrintAddressFamily


public void PrintAddress(String ipAddressString)
{
    // Creates an instance of the IPAddress for the specified IP string in 
    // dotted-quad notation. 
    IPAddress hostIPAddress = IPAddress.Parse(ipAddressString);

    Console.WriteLine("\nThe IP address '" 
        + ipAddressString + "' is {0}", hostIPAddress.ToString());
} //PrintAddress

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 1.0, 1.1, 2.0
Obsolete (compiler warning) in 3.0

.NET Compact Framework

Supported in: 1.0
Obsolete (compiler warning) in 2.0

Community Additions

ADD
Show:
© 2014 Microsoft