Hi,
on Windows 7 I can enable and disable connections via the Network Connections Manager panel (in system settings).
How can I do this programmatically in C#? Thanks
Hi,
on Windows 7 I can enable and disable connections via the Network Connections Manager panel (in system settings).
How can I do this programmatically in C#? Thanks
You can achieve this in C# by leveraging WMI and the Win32_NetworkAdapter WMI class. The Win32_NetworkAdapter class has Enable and Disable methods which can be executed on a selected network interface.
An example of usage can be found here: