Interface used for internet connectivity

I have multiple network interfaces (ethernet, Wireless80211, ppp etc.) avilable  on my laptop. I need to find out which all interfaces are providing internet connectivity.

Any help on this please?
Sumesh_MenonAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Sumesh_MenonConnect With a Mentor Author Commented:
I method i have already found out.
1. Check intenet connectivity by using:
System.Net.IPHostEntry objIPHE = System.Net.Dns.GetHostByName("www.google.com");
2. Use ping to find out 1st hop IP.
3. Compare this IP with Gateway of all interfaces.

Wondering if there is any better alternative?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.