Search code examples
c#wpfnetwork-programmingdisconnect

Disconnect Network C#


Is it possible for me to disconnect the systems connection to the internet without the need for detecting the network adapter etc.?

I would like to add this functionality to my software but can't find a proper method.

Can anyone shine some light on this.

I am running it through a WPF app.

Thanks


Solution

  • There are many ways to implement your requirement, the best is depend on the platforms which you want support and for other requirements.

    I am sure that it is not the full list of possible ways. I know no simple .NET API which can you use.

    You should be careful to be sure that after the end of your application the computer can work as before.