Class NetworkChange
Contains information about changes in the availability and address of the network.
Inherited Members
Namespace: System.Net.NetworkInformation
Assembly: System.Net.dll
Syntax
public static class NetworkChange
Events
NetworkAddressChanged
Event occurs when the IP address of a network interface changes.
Declaration
public static event NetworkAddressChangedEventHandler NetworkAddressChanged
Event Type
Type | Description |
---|---|
NetworkAddressChangedEventHandler |
Remarks
The NetworkChange class raises NetworkAddressChanged events when the address of a network interface, also called a network card or adapter, changes.
To have a NetworkChange object call an event-handling method when a NetworkAddressChanged event occurs, you must associate the method with a NetworkAddressChangedEventHandler delegate, and add this delegate to this event.
NetworkAPStationChanged
Event occurs when a station connects or disconnects from Soft Access Point.
Declaration
public static event NetworkAPStationChangedEventHandler NetworkAPStationChanged
Event Type
Type | Description |
---|---|
NetworkAPStationChangedEventHandler |
Remarks
The NetworkChange class raises the NetworkAPStationChanged events when a client connects or disconnects from the Soft AP.
To have a NetworkChange object call an event-handling method when a NetworkAPStationChanged event occurs, you must associate the method with a NetworkAPStationChangedEventHandler delegate, and add this delegate to this event.
NetworkAvailabilityChanged
Event occurs when the availability of the network changes.
Declaration
public static event NetworkAvailabilityChangedEventHandler NetworkAvailabilityChanged
Event Type
Type | Description |
---|---|
NetworkAvailabilityChangedEventHandler |
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.