Profile. Get Network Connectivity Level Method
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.
Gets the network connectivity level for this connection. This value indicates what network resources, if any, are currently available.
public: virtual NetworkConnectivityLevel GetNetworkConnectivityLevel() = GetNetworkConnectivityLevel;
public NetworkConnectivityLevel GetNetworkConnectivityLevel();
Public Function GetNetworkConnectivityLevel () As NetworkConnectivityLevel
The level of network connectivity.
The GetNetworkConnectivityLevel method may take time in some cases to determine the current value of the network connectivity level. The recommended process for determining the network connectivity level is to register a handler for the NetworkStatusChanged event on the NetworkInformation class. When a notification is received of a network status change, obtain the new connectivity level by calling the GetNetworkConnectivityLevel method on the profile returned by the GetInternetConnectionProfile method. The returned network connectivity level can then be stored for later use when needed. This also ensures that the correct ConnectionProfile is checked.