How to check network connectivity in C # application

I have a connectEvent event that does not fire when the client network connection to the server is lost, but it will fire when the new client establishes a connection after the first disconnect, which means after ConnectEvent starts. I'm not sure what the reason is

So, here is my question: how can I call "DisconnectEvent" when the network is disconnected, I do not understand I believe that if (Connectivity = false) we can call DisconnectEvent, but where and how we can use it, we will use in the method Initialize ()

+3
source share
1 answer
+1
source

All Articles