Ping google.com to determine if we have an Internet connection or not.

NetworkInterface,GetIsNetworkAvailable() returns true if the Pc is connected to a network adapter, even if the Internet isn't available.