IPAddress Constructor (Int64)
Collapse the table of content
Expand the table of content

IPAddress Constructor (Int64)

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

Initializes a new instance of the IPAddress class with the address specified as an Int64.

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

'Declaration
Public Sub New ( _
	newAddress As Long _
)

Parameters

newAddress
Type: System.Int64
The long value of the IP address. For example, the value 0x2414188f in big-endian format would be the IP address "143.24.20.36".

ExceptionCondition
ArgumentOutOfRangeException

The newAddress parameter is out of range for an IPv4 address.

The IPAddress instance is created with the IP address set to newAddress.

The IPAddress(Int64) constructor can only be used to construct an IPv4 address, since the size of the Int64 is not large enough for an IPv6 address.

The Int64 value is assumed to be in network byte order.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2017 Microsoft