DeviceNetworkInformation Class
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Contains network information for a specific Windows Phone device.
Inheritance Hierarchy
System..::.Object
Microsoft.Phone.Net.NetworkInformation..::.DeviceNetworkInformation
Namespace: Microsoft.Phone.Net.NetworkInformation
Assembly: Microsoft.Phone (in Microsoft.Phone.dll)
Syntax
Public NotInheritable Class DeviceNetworkInformation
public static class DeviceNetworkInformation
The DeviceNetworkInformation type exposes the following members.
Properties
Name | Description | |
---|---|---|
CellularMobileOperator | Gets the name of the currently registered or connected mobile operator. | |
IsCellularDataEnabled | Gets a value that indicates whether the network is cellular data enabled. | |
IsCellularDataRoamingEnabled | Gets a value that indicates whether the network allows data roaming. | |
IsNetworkAvailable | Gets a value that indicates whether the network is available. | |
IsWiFiEnabled | Gets a value that indicates whether the network is Wi-Fi enabled. |
Top
Methods
Name | Description | |
---|---|---|
ResolveHostNameAsync(DnsEndPoint, NameResolutionCallback, Object) | Asynchronously resolves a host name on the first available network interface. | |
ResolveHostNameAsync(DnsEndPoint, NetworkInterfaceInfo, NameResolutionCallback, Object) | Asynchronously resolves a host name on a specified network interface. |
Top
Events
Name | Description | |
---|---|---|
NetworkAvailabilityChanged | Occurs when the availability of the network changes. For example, an application can register for this event and get a notification if a WiFi network becomes available. The application could then adjust its behavior to take advantage of this high bandwidth network interface. |
Top
Remarks
The DeviceNetworkInformation class contains properties that identify the network functionality that is available on the device, methods to resolve a host name, and an event that occurs when the network status of the device changes.
Version Information
Windows Phone OS
Supported in: 8.1, 8.0, 7.1
Platforms
Windows Phone
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Reference
Microsoft.Phone.Net.NetworkInformation Namespace
Other Resources
Network and network interface information for Windows Phone 8