Check if IP address is an IPv6 site local address in CSharp

Description

The following code shows how to check if IP address is an IPv6 site local address.

Example


//from w w  w .j  ava 2  s . c  o m
using System;
using System.Net;
using System.Net.Sockets;

public class Example
{
   public static void Main()
   {
      IPAddress address = IPAddress.Parse("127.0.0.1");
      Console.WriteLine(address.IsIPv6SiteLocal);

   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    Network »




IP
Web Client