检查网络可用性等VB.net [英] Check Network Availablility VB.net

查看:285
本文介绍了检查网络可用性等VB.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在写,将用于在移动环境中,其中网络连接性将是向上/向下定期的应用程序。我该如何检查一个特定的网络可用?

I'm writing an application that will be used in a mobile environment where network connectivity will be up/down regularly. How do I check to see that a specific network is available?

推荐答案

尝试<一href="http://msdn.microsoft.com/en-us/library/system.net.networkinformation.networkinterface.getisnetworkavailable.aspx"相对=nofollow> NetworkInterface.GetIsNetworkAvailable

表示任何网络连接是否可用。

Indicates whether any network connection is available.

一个网络连接被认为是可用的,如果任何网络接口被标记为向上,而不是一个回环或隧道接口。

A network connection is considered to be available if any network interface is marked "up" and is not a loopback or tunnel interface.

这篇关于检查网络可用性等VB.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆