Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

NetworkChange::NetworkAvailabilityChanged Event

 

Occurs when the availability of the network changes.

Namespace:   System.Net.NetworkInformation
Assembly:  System (in System.dll)

public:
event NetworkAvailabilityChangedEventHandler^ NetworkAvailabilityChanged {
	static void add(NetworkAvailabilityChangedEventHandler^ value);
	static void remove(NetworkAvailabilityChangedEventHandler^ value);
}

The NetworkChange class raises 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 NetworkChange object call an event-handling method when a NetworkAvailabilityChanged event occurs, you must associate the method with a NetworkAvailabilityChangedEventHandler delegate, and add this delegate to this event.

The NetworkAvailabilityChanged event is supported on Windows 2000 and later.

.NET Framework
Available since 2.0
Return to top
Show:
© 2017 Microsoft