NetworkInterface Class
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Provides configuration information for a network interface.
System.Net.NetworkInformation::NetworkInterface
Microsoft.Phone.Net.NetworkInformation::NetworkInterface
Assembly: Microsoft.Phone (in Microsoft.Phone.dll)
The NetworkInterface type exposes the following members.
| Name | Description | |
|---|---|---|
![]() ![]() | NetworkInterfaceType | Gets the type of the network that is servicing Internet requests. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() ![]() | GetInternetInterface | Gets the NetworkInterface object. |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
In general, the developer of a mobile application doesn’t care how the application’s interaction with the Internet is routed—that is, whether it goes over the cellular connection or a connection to a local Wi-Fi hotspot. However, for some applications the type of connection matters. Examples are applications that can offer an enhanced experience over a high-bandwidth Wi-Fi connection or those that want to take care not to overuse a broadband mobile network.
The NetworkInterfaceType property of this class can provide an application with the current connection type.
Applications can be notified when network changes occur on the device—for example, when the Wi-Fi or mobile broadband network goes up or down. The application must register for the NetworkAddressChanged event of the System.Net.NetworkInformation.NetworkChange class. On receipt of the event, the application can use the NetworkInterfaceType property to determine the current connection state.



