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

html - height not adding height to a empty div -

Oracle SQL. How to select specific IDs where value of columns specify criteria? -

python - Robot Framework location and name of keyword -