查找连接到Internet的适配器 [英] To find the Adapter that connects to the Internet

查看:93
本文介绍了查找连接到Internet的适配器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我需要一段代码来确定计算机是通过哪个网络适配器连接到Internet的.由于连接到我的系统的适配器太多,我希望我的应用程序仅显示有关连接到Internet的适配器的信息.

我的应用程序是一个C#Windows窗体应用程序.

在此先感谢您.

Hi,

I want a piece of code that determines through which network adapter the computer is connected to the internet. As there are so many adapters connected to my system, I want my application to display the information only about the adapter which is connected to the internet.

My application is a C# windows form application.

Thanks in advance.

推荐答案

稍作搜索便可以得出结论;

http://stackoverflow.com/questions/515436/how-to-get-internet- ip/515449 [ ^ ]
A little search throws this up;

http://stackoverflow.com/questions/515436/how-to-get-internet-ip/515449[^]


这篇关于查找连接到Internet的适配器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆