Address Property
Collapse the table of content
Expand the table of content

IPAddress.Address Property

Note: This API is now obsolete. The non-obsolete alternative is GetAddressBytes().

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets or sets an Internet Protocol (IP) address for IPv4.

Namespace:  System.Net
Assembly:  System.Net (in System.Net.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 Value

Type: System.Int64
An IPv4 address represented as an integer.

ExceptionCondition
SocketException

The AddressFamily property is InterNetworkV6.

This property is obsolete. Use GetAddressBytes to get the IP address as an array of bytes.

The Address property is assumed to be in network byte order.

This property can only be used to get or set an IPv4 address, since the size of the long data type is not large enough for an IPv6 address.

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

Windows Phone OS

Obsolete (compiler warning) in 8.1
Obsolete (compiler warning) in 8.0
Obsolete (compiler warning) in 7.1

Windows Phone

Show:
© 2017 Microsoft