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
Object Platform::Object IInspectable NetworkInformation
Windows 10 (introduced in 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
Windows.Foundation.UniversalApiContract (introduced in v1.0)
For examples of how NetworkInformation class methods are implemented, see Quickstart: Retrieving network connection information.
Gets a list of profiles for connections, active or otherwise, on the local machine.
Gets a list of host names associated with the local machine.
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.
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.
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 proxy configuration for a connection using the specified URI.
This class method is not supported on Windows Phone.
Gets a sorted list of EndpointPair objects.
Occurs when the network status changes for a connection.