[英]NetworkInterface, Wifi or Lan?
How do i find out if a NetworkInterface is a Wifi or Lan Card in C#?我如何确定 C# 中的 NetworkInterface 是 Wifi 还是 Lan 卡? And is there a safe way of determining this?
有没有一种安全的方法来确定这一点?
You can use the NetworkInterfaceType property of the NetworkInterface class.您可以使用NetworkInterface class 的NetworkInterfaceType属性。
It will be equal to NetworkInterfaceType.Wireless80211
if the interface represents a WiFi adapter.如果接口表示 WiFi 适配器,它将等于
NetworkInterfaceType.Wireless80211
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.