如何检查用户是否连接到互联网wp7?

发布于 2024-11-27 14:38:37 字数 55 浏览 5 评论 0原文

如何检查用户是否已连接到互联网? 我有一个使用服务的程序,我想先检查一下,

谢谢

how do you check if the user is connected to the internet ?
ive a program that uses services and i'd like to check first

thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

夜巴黎 2024-12-04 14:38:37

http://www .diaryofaninja.com/blog/2010/12/09/checking-for-network-connectivity-in-windows-phone-7-sdk

if (NetworkInterface.GetIsNetworkAvailable())
{ 

}

应该是正确的方法。

As seen on http://www.diaryofaninja.com/blog/2010/12/09/checking-for-network-connectivity-in-windows-phone-7-sdk:

if (NetworkInterface.GetIsNetworkAvailable())
{ 

}

Should be the correct way.

方圜几里 2024-12-04 14:38:37

电话 api 没有互联网访问状态。尽管有各种状态,您仍需要实际拨打电话来测试它是否可用。请参阅检查的最佳方法是什么使用 .NET 连接互联网?

The phone api does not have a status for internet acces. You will need to actually make a call to test whether it's available despite the various statuses. See What is the best way to check for Internet connectivity using .NET?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文