c# - How do I check for a network connection? -


what best way determine if there network connection available?

you can check network connection in .net 2.0 using getisnetworkavailable():

system.net.networkinformation.networkinterface.getisnetworkavailable() 

to monitor changes in ip address or changes in network availability use events networkchange class:

system.net.networkinformation.networkchange.networkavailabilitychanged system.net.networkinformation.networkchange.networkaddresschanged 

Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -