C# get network connection status and speed in XP

家住魔仙堡 提交于 2019-12-25 08:40:01

问题


how can I get the connection statues and speed in windows XP?


回答1:


This should tell you if a network is available.

bool IsAvailable = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable();

Gets the speed of the network

long NetworkSpeed = System.Net.NetworkInformation.NetworkInterface.Speed;

See here for other things you can use: http://msdn.microsoft.com/en-us/library/system.net.networkinformation.networkinterface(v=VS.100).aspx



来源:https://stackoverflow.com/questions/3921999/c-sharp-get-network-connection-status-and-speed-in-xp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!