NetworkChange.NetworkAvailabilityChanged Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs when the availability of the network changes.
public:
static event System::Net::NetworkInformation::NetworkAvailabilityChangedEventHandler ^ NetworkAvailabilityChanged;
public static event System.Net.NetworkInformation.NetworkAvailabilityChangedEventHandler? NetworkAvailabilityChanged;
[System.Runtime.Versioning.UnsupportedOSPlatform("illumos")]
[System.Runtime.Versioning.UnsupportedOSPlatform("solaris")]
public static event System.Net.NetworkInformation.NetworkAvailabilityChangedEventHandler? NetworkAvailabilityChanged;
public static event System.Net.NetworkInformation.NetworkAvailabilityChangedEventHandler NetworkAvailabilityChanged;
member this.NetworkAvailabilityChanged : System.Net.NetworkInformation.NetworkAvailabilityChangedEventHandler
[<System.Runtime.Versioning.UnsupportedOSPlatform("illumos")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("solaris")>]
member this.NetworkAvailabilityChanged : System.Net.NetworkInformation.NetworkAvailabilityChangedEventHandler
Public Shared Custom Event NetworkAvailabilityChanged As NetworkAvailabilityChangedEventHandler
Event Type
- Attributes
Remarks
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.