IPAddress Constructor (Byte[])
Namespace: System.Net
Assembly: System (in System.dll)
Parameters
- address
- Type: System.Byte[]
The byte array value of the IP address.
| Exception | Condition |
|---|---|
| ArgumentNullException | address is null. |
| ArgumentException | address contains a bad IP address. |
The IPAddress is created with the Address property set to address.
If the length of address is 4, IPAddress(Byte[]) constructs an IPv4 address; otherwise, an IPv6 address with a scope of 0 is constructed.
The Byte array is assumed to be in network byte order with the most significant byte first in index position 0.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.