ConnectionProfile.GetNetworkConnectivityLevel Method

Definition

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

public:
 virtual NetworkConnectivityLevel GetNetworkConnectivityLevel() = GetNetworkConnectivityLevel;
NetworkConnectivityLevel GetNetworkConnectivityLevel();
public NetworkConnectivityLevel GetNetworkConnectivityLevel();
function getNetworkConnectivityLevel()
Public Function GetNetworkConnectivityLevel () As NetworkConnectivityLevel

Returns

The level of network connectivity.

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.

Applies to

See also