IPInterfaceProperties.IsDnsEnabled Propriedade
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Obtém um Boolean valor que indica se o NetBt está configurado para usar resolução de nomes DNS nesta interface.
public:
abstract property bool IsDnsEnabled { bool get(); };
public abstract bool IsDnsEnabled { get; }
member this.IsDnsEnabled : bool
Public MustOverride ReadOnly Property IsDnsEnabled As Boolean
Valor de Propriedade
true se o NetBt estiver configurado para usar resolução de nomes DNS nesta interface; caso contrário, false.
Exemplos
O seguinte exemplo de código mostra o valor desta propriedade.
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
Observações
O DNS é um sistema hierárquico de nomenclatura utilizado para mapear nomes de host para endereços IP.