不好判断,速度不是固定的,有可能这一秒查询是2M,下一秒查询就是1k了。如果要不停的查询,也是很耗资源的
Dim adapters() As System.Net.NetworkInformation.NetworkInterface = System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()
For Each adapter As System.Net.NetworkInformation.NetworkInterface In adapters
Output.Show("描述:" & adapter.Description)
Output.Show("标识符:" & adapter.Id)
Output.Show("名称:" & adapter.Name)
Output.Show("类型:" & adapter.NetworkInterfaceType)
Output.Show("速度:" & adapter.Speed * 0.001 * 0.001 & "M")
Output.Show("操作状态:" & adapter.OperationalStatus)
Output.Show("MAC 地址:" & adapter.GetPhysicalAddress().Tostring)
Dim ipp = adapter.GetIPProperties().UnicastAddresses
For Each ip As System.Net.NetworkInformation.UnicastIPAddressInformation In ipp
If ip.Address.AddressFamily = System.Net.Sockets.AddressFamily.InterNetwork
Output.Show("IP 地址: " & ip.Address.ToString())
Exit For
End If
Next
Next