NetworkInformation Class

为于本地计算机提供对网络连接信息的访问。

语法


var networkInformation = Windows.Networking.Connectivity.NetworkInformation;

特性

[DualApiPartition()]
[MarshalingBehavior(Agile)]
[Version(0x06020000)]

成员

NetworkInformation类 具有这些类型的成员:

事件

NetworkInformation类 具有这些事件。

事件说明
NetworkStatusChanged Occurs when the network status changes for a connection.

 

方法

The NetworkInformation 类 具有这些方法。 对于 C#、Visual Basic 和 C++,它还继承方法于Object 类.

方法说明
FindConnectionProfilesAsync Returns an array of ConnectionProfile objects that match the filtering criteria defined by ConnectionProfileFilter.
GetConnectionProfiles Gets a list of profiles for connections, active or otherwise, on the local machine.
GetHostNames Gets a list of host names associated with the local machine.
GetInternetConnectionProfile Gets the connection profile associated with the internet connection currently used by the local machine.
GetLanIdentifiers Gets an array of LanIdentifier objects that contain locality information for each NetworkAdapter object that currently connected to a network.
GetProxyConfigurationAsync Gets a proxy configuration for the connection using the specified URI.
GetSortedEndpointPairs Gets a sorted list of EndpointPair objects.

 

备注

有关 NetworkInformation 类方法如何实现的示例,请参见快速入门:检索网络连接信息

要求

最低支持客户端

Windows 8 [Windows 应用商店应用程序, 桌面应用程序]

最低支持服务器

Windows Server 2012 [Windows 应用商店应用程序, 桌面应用程序]

最低支持电话

Windows Phone 8

命名空间

Windows.Networking.Connectivity
Windows::Networking::Connectivity [C++]

元数据

Windows.winmd

 

 

显示:
© 2014 Microsoft