Share via


Connectivity.NetworkAccess Property

Definition

Gets the current state of network access.

public:
 static property Microsoft::Maui::Networking::NetworkAccess NetworkAccess { Microsoft::Maui::Networking::NetworkAccess get(); };
public static Microsoft.Maui.Networking.NetworkAccess NetworkAccess { get; }
static member NetworkAccess : Microsoft.Maui.Networking.NetworkAccess
Public Shared ReadOnly Property NetworkAccess As NetworkAccess

Property Value

The current network access state.

Remarks

Even when Internet is returned, full internet access is not guaranteed.

Can throw PermissionException on Android if ACCESS_NETWORK_STATE is not set in manifest.

Applies to