Detecting network state (connected - disconnected) in C#

后端 未结 4 2242
南旧
南旧 2021-01-03 03:57

I am in need of a piece of code that can detect if a network connection is connected or disconnected. The connected state would mean a cable was plugged into the Ethernet co

4条回答
  •  臣服心动
    2021-01-03 04:56

    Check out this MSDN article:

    Testing for and Responding to Network Connections in the .NET Compact Framework

提交回复
热议问题