Udostępnij za pośrednictwem


IPInterfaceProperties.IsDynamicDnsEnabled Właściwość

Definicja

Pobiera wartość wskazującą Boolean , czy ten interfejs jest skonfigurowany do automatycznego rejestrowania informacji o adresie IP za pomocą systemu nazw domen (DNS).

public:
 abstract property bool IsDynamicDnsEnabled { bool get(); };
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public abstract bool IsDynamicDnsEnabled { get; }
public abstract bool IsDynamicDnsEnabled { get; }
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
member this.IsDynamicDnsEnabled : bool
member this.IsDynamicDnsEnabled : bool
Public MustOverride ReadOnly Property IsDynamicDnsEnabled As Boolean

Wartość właściwości

true jeśli ten interfejs jest skonfigurowany do automatycznego rejestrowania mapowania między jego dynamicznym adresem IP i statycznych nazw domen; w przeciwnym razie , false.

Atrybuty

Przykłady

Poniższy przykład kodu przedstawia wartość tej właściwości.

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();
}
Public Shared Sub DisplayDnsConfiguration() 
    Dim adapters As NetworkInterface() = NetworkInterface.GetAllNetworkInterfaces()
    Dim adapter As NetworkInterface
    For Each adapter In  adapters
        Dim properties As IPInterfaceProperties = 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)
    Next adapter

End Sub

Uwagi

Dynamiczny system DNS umożliwia klientowi informowanie serwerów DNS, że jego dynamiczny adres IP jest mapowany na jego statyczną nazwę hosta.

Dotyczy