IPInterfaceProperties.DnsSuffix Propriedade

Definição

Obtém o sufixo DNS (Sistema de Nomes de Domínio) associado a essa interface.

public:
 abstract property System::String ^ DnsSuffix { System::String ^ get(); };
public abstract string DnsSuffix { get; }
member this.DnsSuffix : string
Public MustOverride ReadOnly Property DnsSuffix As String

Valor da propriedade

Um String que contém o sufixo DNS para essa interface ou Empty se não houver sufixo DNS para a interface.

Exemplos

O exemplo de código a seguir exibe o sufixo DNS.

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

Comentários

O sufixo DNS identifica o nome de domínio (por exemplo, "contoso.com") que é acrescentado a um nome de host não qualificado para obter um FQDN (nome de domínio totalmente qualificado) adequado para uma consulta de nome DNS. Por exemplo, se o computador local tiver "contoso.com" como ele DnsSuffixe precisar resolver o nome do host não qualificado "www", o FQDN para consulta será "www.contoso.com".

Aplica-se a