SALES: 1-800-867-1380
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.

SocketExtensions.GetCurrentNetworkInterface Method

May 11, 2014

Gets all available information about the network interface.

Namespace:  Microsoft.Phone.Net.NetworkInformation
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)

public static NetworkInterfaceInfo GetCurrentNetworkInterface(
	this Socket socket
)

Parameters

socket
Type: System.Net.Sockets.Socket
The network interface for which to get the information.

Return Value

Type: Microsoft.Phone.Net.NetworkInformation.NetworkInterfaceInfo
All available information about the network interface. Use the InterfaceType and InterfaceSubtype properties to determine the network interface technology.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Socket. When you use instance method syntax to call this method, omit the first parameter.

ExceptionCondition
ArgumentNullException

socket is null.

NetworkException

socket is not bound.

NetworkException

Unable to get the session handle for socket.

NetworkException

socket is not connected.

NetworkException

Unable to get the information for socket.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft