SocketAddress Constructor (AddressFamily, Int32)
Collapse the table of content
Expand the table of content

SocketAddress Constructor (AddressFamily, Int32)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Creates a new instance of the SocketAddress class using the specified address family and buffer size.

Namespace:  System.Net
Assembly:  System.Net (in System.Net.dll)

'Declaration
Public Sub New ( _
	family As AddressFamily, _
	size As Integer _
)

Parameters

family
Type: System.Net.Sockets.AddressFamily
An AddressFamily enumerated value.
size
Type: System.Int32
The value to set for the Size property which affects the number of bytes to allocate for the underlying buffer.

ExceptionCondition
ArgumentOutOfRangeException

size is less than 2. These 2 bytes are needed to store family.

Use this constructor to create a new instance of the SocketAddress class with a particular value for the Size property and the associated underlying buffer size. The Size property is less than the associated buffer size by a fixed amount.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2017 Microsoft