I\'m writing a program in C# that needs to monitor the amount of internet bandwidth currently in use so it can do a background upload when the internet usage is low. How ca
There are any number of ways an adapter may show as "connected to the internet" when it isn't. Conversely, it's possible for it to "not be connected to the internet" and still be connected.
Like many things in life, "The proof of the pudding is in the eating" If you want to know if you're connected, you'll need to try to talk to something.
I like time.gov since it returns a tiny chunk of XML containing the current time so you can make sure you're actually connecting to the net and not getting some sort of cached data or a redirect to a captive portal.
Just loop through the adapters and see which actually has connectivity.