如何获得wlan传输速度?

How to get wlan transfer speed?

如何获取wlan传输速度(PC-Router)的当前值?我试图在 wlanapi 库中搜索此参数,但我不能。

我要"wireless network connection speed"。我猜它与 "theoretical bits per second"

相同

I want "wireless network connection speed". I guess it is the same as "theoretical bits per second"

你可以这样获取:

var speed = NetworkInterface.GetAllNetworkInterfaces()
            .Where(inf => inf.NetworkInterfaceType == NetworkInterfaceType.Wireless80211)
            .Where(inf => inf.OperationalStatus == OperationalStatus.Up)
            .Select(inf => inf.Speed)
            .First();