AppStore.App.HasInternet C# (CSharp) Method

HasInternet() public static method

It determines whether the phone has an internet access or not.
public static HasInternet ( ) : bool
return bool
        public static bool HasInternet()
        {
            var connectionProfile = NetworkInformation.GetInternetConnectionProfile();
            return (connectionProfile != null &&
                    connectionProfile.GetNetworkConnectivityLevel() == NetworkConnectivityLevel.InternetAccess);
        }