Socket.OSSupportsIPv6 Property

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 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.


bool ipv6Supported = Socket.OSSupportsIPv6;
if (ipv6Supported) 
  outputBlock.Text += "IPv6 is supported\n";
else
  outputBlock.Text += "IPv6 is not supported\n";


Silverlight

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.

Community Additions

ADD
Show: