System.Net.NetworkInformation.NetworkChange.NetworkAvailabilityChanged Event

Occurs when the availability of the network changes.


public static event NetworkAvailabilityChangedEventHandler NetworkAvailabilityChanged


The System.Net.NetworkInformation.NetworkChange class raises NetworkChange.NetworkAvailabilityChanged events when the availability of the network changes. The network is available when at least one network interface is marked "up" and is not a tunnel or loopback interface.

To have a System.Net.NetworkInformation.NetworkChange object call an event-handling method when a NetworkChange.NetworkAvailabilityChanged event occurs, you must associate the method with a System.Net.NetworkInformation.NetworkAvailabilityChangedEventHandler delegate, and add this delegate to this event.

The NetworkChange.NetworkAvailabilityChanged event is supported on Windows 2000 and later.


Namespace: System.Net.NetworkInformation
Assembly: System (in System.dll)
Assembly Versions:,
Since: .NET 2.0