Mono Class Library: System.Net Namespace

System.Net.IPAddress Class

Represents an Internet Protocol (IP) address. [Edit]

See Also: IPAddress Members

public class IPAddress

Thread Safety

All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.

Remarks

An instance of the System.Net.IPAddress class contains the value of an address on an IP network. This address is stored internally as a long in network-byte-order.

Note: Different conventions are in use for ordering bytes within multi-byte data types. All IP address values must be sent over the network in network-byte-order. Network-byte-order puts the most significant byte first (also known as big-endian order). On the host, the ordering of bytes is platform-specific and this ordering is referred to as host-byte-order.

The IP address can be represented as four numbers in the range 0-255 separated by periods (for example, "192.168.1.2"), known as dotted-quad notation.

Note:

The address space is fragmented into different types determined by bits 31-28 as shown in the following table.

Bits 31-28Address typeAddress range
0xxxclass A 0.0.0.0-127.255.255.255
10xxclass B128.0.0.0-191.255.255.255
110xclass C192.0.0.0-223.255.255.255
1110multicast224.0.0.0-239.255.255.255
1111reserved240.0.0.0-255.255.255.255

Instances of the System.Net.IPAddress class are provided for common IP address values as shown in the following table.

FieldIP Address
Any0.0.0.0
Broadcast255.255.255.255
Loopback127.0.0.1
None255.255.255.255

[Edit]

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.x.x, 1.0.5000.0, 2.0.0.0