ConnectionProfile.GetNetworkConnectivityLevel ConnectionProfile.GetNetworkConnectivityLevel ConnectionProfile.GetNetworkConnectivityLevel ConnectionProfile.GetNetworkConnectivityLevel ConnectionProfile.GetNetworkConnectivityLevel Method

Definition

Gets the network connectivity level for this connection. This value indicates what network resources, if any, are currently available.

public : NetworkConnectivityLevel GetNetworkConnectivityLevel()
NetworkConnectivityLevel GetNetworkConnectivityLevel() const;
public NetworkConnectivityLevel GetNetworkConnectivityLevel()
Public Function GetNetworkConnectivityLevel() As NetworkConnectivityLevel
var networkConnectivityLevel = connectionProfile.getNetworkConnectivityLevel();

Returns

Remarks

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.

See also