NetworkInformation class

Applies to Windows and Windows Phone

Provides access to network connection information for the local machine.

Syntax


var networkInformation = Windows.Networking.Connectivity.NetworkInformation;

Attributes

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

Members

The NetworkInformation class has these types of members:

Events

The NetworkInformation class has these events.

EventDescription
NetworkStatusChanged Occurs when the network status changes for a connection.

 

Methods

The NetworkInformation class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
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.This class method is not supported on Windows Phone.
GetSortedEndpointPairs Gets a sorted list of EndpointPair objects.

 

Remarks

For examples of how NetworkInformation class methods are implemented, see Quickstart: Retrieving network connection information.

Requirements

Minimum supported client

Windows 8 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 [Windows Store apps, desktop apps]

Minimum supported phone

Windows Phone 8

Namespace

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

Metadata

Windows.winmd

 

 

Show:
© 2014 Microsoft