次の方法で共有


IPInterfaceProperties.IsDynamicDnsEnabled プロパティ

定義

このインターフェイスがドメイン ネーム システム (DNS) を使用して自動的に IP アドレス情報を登録するように構成されているかどうかを示す Boolean 値を取得します。

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

プロパティ値

このインターフェイスが動的 IP アドレスと静的ドメイン名との対応付けを自動的に登録するように構成されている場合は true。それ以外の場合は false

属性

次のコード例では、このプロパティの値を表示します。

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

注釈

動的 DNS を使用すると、クライアントは動的 IP アドレスが静的ホスト名にマップされていることを DNS サーバーに通知できます。

適用対象