This topic has not yet been rated - Rate this topic

SocketExtensions.AssociateToNetworkInterface Method

April 12, 2014

Sets information about a network interface by associating it with a new set of network interface information.

Namespace:  Microsoft.Phone.Net.NetworkInformation
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)
public static void AssociateToNetworkInterface(
	this Socket socket,
	NetworkInterfaceInfo networkInterface
)

Parameters

socket
Type: System.Net.Sockets.Socket
The network interface for which to set information.
networkInterface
Type: Microsoft.Phone.Net.NetworkInformation.NetworkInterfaceInfo
The new network interface information.

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 or networkInterface is null.

ArgumentException

networkInterface is not connected.

NetworkException

socket is already bound.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.