How to check for a network connection in .NET 2.0 (C# or VB)
Posted January 18th, 2006 by derek DevelopmentTo check for a network connection in .NET 2.0 use this:
System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable() To monitor a change in IP address or a change in network availability, use the events from the NetworkChange class:
System.Net.NetworkInformation.NetworkChange.NetworkAvailabilityChanged
System.Net.NetworkInformation.NetworkChange.NetworkAddressChanged
Read a great book: Good to Great: Why Some Companies Make the Leap… and Others Don’t
by Jim Collins


June 6th, 2008 at 7:27 am
Thanks !
I use it to get all Network Connection on system !
September 23rd, 2008 at 12:01 am
Thanks a lot man,
I will use your tip in my software.
Good Tips From Good Men …
October 21st, 2008 at 9:19 pm
Great info!
I’ll use this before pinging my webservices :D
March 17th, 2009 at 2:41 am
Hi,
How can I check web services availability.(.net 2.0 C# or vb.net)?