Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

NetworkInformation class

Provides access to network connection information for the local machine.

Syntax


var networkInformation = Windows.Networking.Connectivity.NetworkInformation;

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 proxy configuration for a 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 (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

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

Attributes

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

See also

Object

 

 

Show:
© 2015 Microsoft