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)

[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 long Address { get; set; }
/** @property */
public long get_Address ()

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

public function get Address () : long

public function set Address (value : long)

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 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()); 
}

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 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 .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

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

.NET Compact Framework

Supported in: 1.0
Obsolete (compiler warning) in 2.0

Community Additions

ADD
Show:
© 2015 Microsoft