IPAddress.IPv6Any Field
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Provides an IPv6 address that indicates that a server must listen for client activity on all network interfaces for IPv6. This field is read-only.
Assembly: System.Net (in System.Net.dll)
The IPv6Any field is equivalent to 0:0:0:0:0:0:0:0 in colon-hexadecimal notation, or to :: in compact notation.
The IPv6Any field is defined even when the Socket.OSSupportsIPv6 property is false.
The following code example displays the value of the current host's IPv6 Any address.
// This method displays the value of the current host's Any address in // standard compressed format. The Any address is used by the host to enable // listening to client activities on all the interfaces for a given port. try { // Get the Any address. IPAddress any = IPAddress.IPv6Any; // Transform the Any address to a string using the overloaded // ToString() method. Note that the resulting string is in the compact // form: "::". string ipv6Any = any.ToString(); // Display the Any address. outputBlock.Text += "The IPv6 Any address is: "; outputBlock.Text += ipv6Any; outputBlock.Text += "\n"; } catch (Exception e) { outputBlock.Text += "Exception: "; outputBlock.Text += e.ToString(); outputBlock.Text += "\n"; }