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
Post a Comment