다음을 통해 공유


IPInterfaceProperties.IsDnsEnabled 속성

정의

NetBt가 이 인터페이스에서 DNS 이름 확인을 사용하도록 구성되어 있는지 여부를 나타내는 Boolean 값을 가져옵니다.

public:
 abstract property bool IsDnsEnabled { bool get(); };
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("freebsd")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("osx")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public abstract bool IsDnsEnabled { get; }
public abstract bool IsDnsEnabled { get; }
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("freebsd")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("osx")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
member this.IsDnsEnabled : bool
member this.IsDnsEnabled : bool
Public MustOverride ReadOnly Property IsDnsEnabled As Boolean

속성 값

NetBt가 이 인터페이스에서 DNS 이름 확인을 사용하도록 구성되어 있으면 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 주소에 매핑하는 데 사용되는 계층적 명명 시스템입니다.

적용 대상