Check if the IP address is an IPv4-mapped IPv6 address in CSharp

Description

The following code shows how to check if the IP address is an IPv4-mapped IPv6 address.

Example


using System;//from   ww  w  .  jav a2 s. c  om
using System.Net;
using System.Net.Sockets;

public class Example
{
    public static void Main()
    {
        Console.WriteLine(IPAddress.Loopback.IsIPv4MappedToIPv6);

    }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    Network »




IP
Web Client