C# 怎么知道DNS是不是自动获取的?
通过
ManagementClass wmi = new ManagementClass("Win32_NetworkAdapterConfiguration");
ManagementObjectCollection moc = wmi.GetInstances();
foreach (ManagementObject mo in moc) {
if (!(bool)mo["IPEnabled"]) { continue; }
bool dhcpEnabled = mo["DHCPEnabled"];
}
我是能知道IP信息是不是自动获取的,但是DNS怎么才能知道是自动获取还是手动填写的?
------解决方案--------------------
http://topic.csdn.net/u/20080321/16/65b74b7d-aaf4-4330-a440-16e73d812f0a.html?312557867