C# Kiểm tra giá trị ipv 6 - validates an ipv6 address



// using System.Net

public static bool IsIpV6AddressValid(string address)
{
    if (!string.IsNullOrWhiteSpace(address))
    {
         IPAddress ip;
         if (IPAddress.TryParse(address, out ip))
         {
              return ip.AddressFamily == AddressFamily.InterNetworkV6;
         }
    }
    return false;
}

C# Kiểm tra giá trị ipv 6 - validates an ipv6 address
Share To:

laptrinhvien

Post A Comment:

0 comments so far,add yours