IPAddress.IPv6None Field


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Provides an IP address that indicates that no network interface should be used. This property is read-only.

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

Public Shared ReadOnly IPv6None As IPAddress

Field Value

Type: System.Net.IPAddress

The Socket.Bind method uses the IPv6None field to indicate that a Socket must not listen for client activity. The IPv6None field is equivalent to 0:0:0:0:0:0:0:0 in colon-hexadecimal notation, or to ::0 in compact notation.

The following code example displays the value of the current host's None address in standard compressed format.

' This function prints the value of the current host's None address in  
' standard compressed format. The None address is used by the host to disable
' listening to client activities on all the interfaces.
Private Shared Sub printIPv6NoneAddress()

      ' Get the None address.
      Dim none As IPAddress = IPAddress.IPv6None

      ' Transform the None address to a string using the overloaded
      ' ToString() method. Note that the resulting string is in the compact 
      ' form: "::".
      Dim ipv6None As String = none.ToString()

      Console.WriteLine(("The IPv6 None address is: " + ipv6None))
   Catch e As Exception
      Console.WriteLine(("[printIPv6NoneAddress] Exception: " + e.ToString()))
   End Try
End Sub 'printIPv6NoneAddress

Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Available since 2.0
Windows Phone Silverlight
Available since 7.1
Return to top