Export (0) Print
Expand All

IPAddressInformation.IsDnsEligible Property

Gets a Boolean value that indicates whether the Internet Protocol (IP) address is valid to appear in a Domain Name System (DNS) server database.

Namespace: System.Net.NetworkInformation
Assembly: System (in system.dll)

public abstract bool IsDnsEligible { get; }
/** @property */
public abstract boolean get_IsDnsEligible ()

public abstract function get IsDnsEligible () : boolean

Not applicable.

Property Value

true if the address can appear in a DNS database; otherwise, false.

Addresses in the range 169.254.0.0 to 169.254.255.255 are not DNS eligible. These addresses are reserved for Automatic Private IP Addressing (APIPA).

The following code example displays the anycast addresses for the network interfaces on the local computer.

public static void DisplayAnycastAddresses()
{
    Console.WriteLine("Anycast Addresses");
    NetworkInterface[] adapters  = NetworkInterface.GetAllNetworkInterfaces();
    foreach (NetworkInterface adapter in adapters)
    {
        IPInterfaceProperties adapterProperties = adapter.GetIPProperties();
        IPAddressInformationCollection anyCast = adapterProperties.AnycastAddresses;
        if (anyCast.Count >0)
        {
            Console.WriteLine(adapter.Description);
            foreach (IPAddressInformation any in anyCast)
            {
                Console.WriteLine("  Anycast Address .......................... : {0} {1} {2}", 
                    any.Address,
                    any.IsTransient ? "Transient" : "", 
                    any.IsDnsEligible ? "DNS Eligible" : ""
                );
            }
            Console.WriteLine();
        }
    }
}

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft