简体   繁体   English

断开网络C#

[英]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.? 是否可以在不需要检测网络适配器等的情况下断开系统与Internet的连接?

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. 我正在通过WPF应用程序运行它。

Thanks 谢谢

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. 我不知道您可以使用任何简单的.NET API。

You should be careful to be sure that after the end of your application the computer can work as before. 您应该小心确保在应用程序结束后,计算机可以像以前一样工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM