Sdílet prostřednictvím


IPInterfaceProperties.IsDynamicDnsEnabled Vlastnost

Definice

Boolean Získá hodnotu, která označuje, zda je toto rozhraní nakonfigurováno pro automatickou registraci informací o IP adrese v systému DNS (Domain Name System).

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

Hodnota vlastnosti

truepokud je toto rozhraní nakonfigurováno tak, aby automaticky zaregistrovalo mapování mezi jeho dynamickou IP adresou a statickými názvy domén; v opačném případě . false

Atributy

Příklady

Následující příklad kódu zobrazí hodnotu této vlastnosti.

void DisplayDnsConfiguration()
{
   array<NetworkInterface^>^adapters = NetworkInterface::GetAllNetworkInterfaces();
   System::Collections::IEnumerator^ myEnum10 = adapters->GetEnumerator();
   while ( myEnum10->MoveNext() )
   {
      NetworkInterface ^ adapter = safe_cast<NetworkInterface ^>(myEnum10->Current);
      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 );
   }
}
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

Poznámky

Dynamický DNS umožňuje klientovi informovat servery DNS, že jeho dynamická IP adresa je namapovaná na jeho statický název hostitele.

Platí pro