NetworkInterface的,无线或LAN? [英] NetworkInterface, Wifi or Lan?

查看:565
本文介绍了NetworkInterface的,无线或LAN?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要如何找出是否一个NetworkInterface的是WiFi或LAN卡在C#中? ?
和有确定本的一种安全的方法

How do i find out if a NetworkInterface is a Wifi or Lan Card in C#? And is there a safe way of determining this?

推荐答案

您可以使用NetworkInterfaceType 财产=htt​​p://msdn.microsoft.com/ EN-US /库/ system.net.networkinformation.networkinterface.aspx>的NetworkInterface 类。

You can use the NetworkInterfaceType property of the NetworkInterface class.

这将是等于 NetworkInterfaceType.Wireless80211 如果接口表示一个无线适配器。

It will be equal to NetworkInterfaceType.Wireless80211 if the interface represents a WiFi adapter.

这篇关于NetworkInterface的,无线或LAN?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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