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

methods - python can't use function in submodule -

c# - DataValidation using Regex not working -

c++ - Map a range of values to a single value -