Socket.OSSupportsIPv6 Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets a value indicating whether IPv6 support is available and enabled on the current host.

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


Public Shared ReadOnly Property OSSupportsIPv6 As Boolean
public static bool OSSupportsIPv6 { get; }

Property Value

Type: System.Boolean
true if the current host supports the IPv4 protocol; otherwise, false.


The operating system may support both IPv4 and IPv6 protocols.


Dim ipv6Supported AS Boolean = Socket.OSSupportsIPv6
If ipv6Supported Then 
  outputBlock.Text &= "IPv6 is supported"
  outputBlock.Text &= "IPv6 is not supported"
End If  
outputBlock.Text &= vbCrLf
bool ipv6Supported = Socket.OSSupportsIPv6;
if (ipv6Supported) 
  outputBlock.Text += "IPv6 is supported\n";
  outputBlock.Text += "IPv6 is not supported\n";

Version Information


Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1


For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.