SelectQuery query = new SelectQuery("Win32_NetworkAdapter", "NetConnectionStatus=2"); ManagementObjectSearcher search = new ManagementObjectSearcher(query); foreach (ManagementObject result in search.Get()) { NetworkAdapter adapter = new NetworkAdapter(result);//error in this line whats the problem if (adapter.AdapterType.Equals("Ethernet 802.3")) { adapter.Disable(); } }
rahul_12789 wrote://error in this line whats the problem
using
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)