IPAddressInformation.IsDnsEligible Property
.NET Framework 2.0
Note: This property is new in the .NET Framework version 2.0.
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)
Assembly: System (in system.dll)
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 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 .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.