IPInterfaceProperties.IsDynamicDnsEnabled Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets a Boolean value that indicates whether this interface is configured to automatically register its IP address information with the Domain Name System (DNS).

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

public abstract bool IsDynamicDnsEnabled { get; }

Property Value

Type: System.Boolean

true if this interface is configured to automatically register a mapping between its dynamic IP address and static domain names; otherwise, false.

Dynamic DNS enables a client to inform the DNS servers that its dynamic IP address is mapped to its static host name.

The following code example displays the value of this property.

public static void DisplayDnsConfiguration()
{
    NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces();
    foreach (NetworkInterface adapter in adapters)
    {
        IPInterfaceProperties properties = adapter.GetIPProperties();
        Console.WriteLine(adapter.Description);
        Console.WriteLine("  DNS suffix .............................. : {0}",
            properties.DnsSuffix);
        Console.WriteLine("  DNS enabled ............................. : {0}", 
            properties.IsDnsEnabled);
        Console.WriteLine("  Dynamically configured DNS .............. : {0}", 
            properties.IsDynamicDnsEnabled);
    }
    Console.WriteLine();
}

.NET Framework
Available since 2.0
Return to top
Show: