IPInterfaceProperties::IsDnsEnabled Property

 

Gets a Boolean value that indicates whether NetBt is configured to use DNS name resolution on this interface.

Namespace:   System.Net.NetworkInformation
Assembly:  System (in System.dll)

public:
property bool IsDnsEnabled {
	virtual bool get() abstract;
}

Property Value

Type: System::Boolean

true if NetBt is configured to use DNS name resolution on this interface; otherwise, false.

DNS is a hierarchical naming system used to map host names to IP addresses.

The following code example displays the value of this property.

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 );
   }
}

.NET Framework
Available since 2.0
Return to top
Show: