NetworkInformation Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides access to network connection information for the local machine.
public ref class NetworkInformation abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class NetworkInformation final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public static class NetworkInformation
Public Class NetworkInformation
- Inheritance
- Attributes
Device family |
Windows 10 (introduced in 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v1.0)
|
For examples of how NetworkInformation class methods are implemented, see Quickstart: Retrieving network connection information.
Find |
Returns an array of ConnectionProfile objects that match the filtering criteria defined by ConnectionProfileFilter. |
Get |
Gets a list of profiles for connections, active or otherwise, on the local machine. |
Get |
Gets a list of host names associated with the local machine. |
Get |
Retrieves the connection profile associated with the preferred interface currently used by the local machine. The preferred interface is the one most likely to send or receive internet traffic. This means that the returned profile might or might not have internet access. |
Get |
Note Some information relates to pre-released product, which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here. Important This API will be affected by upcoming changes to operating system behavior, planned for fall 2024. For more info, see Changes to API behavior for Wi-Fi access and location. Gets an array of LanIdentifier objects that contain locality information for each NetworkAdapter object that currently connected to a network. |
Get |
Gets proxy configuration for a connection using the specified URI. Note This class method is not supported on Windows Phone. |
Get |
Gets a sorted list of EndpointPair objects. |
Network |
Occurs when the network status changes for a connection. |
Product | Versions |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |