Title: check internet connection                                 If you need copy same format use firefox or chrome or safari but iexplorer not work


Preview of Code
using System.Runtime.InteropServices;
 
[DllImport("wininet.dll")]
        private extern static bool InternetGetConnectedState(out int Description, int ReservedValue);
        //Creating a function that uses the API function...
        public static bool IsMachineHasInternet()
        {
            int Desc;
            return InternetGetConnectedState(out Desc, 0);
        }
 
if( IsMachineHasInternet() == true)
{
MessageBox.Show("Internet is available, you can perform your task");
}
else
{
MessageBox.Show("There is no internet connection");
}