SocketAddress Constructor (AddressFamily, Int32)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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

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

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 number of bytes to allocate for the underlying buffer.

Exception Condition
ArgumentOutOfRangeException

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

Use this overload to create a new instance of the SocketAddress class with a particular underlying buffer size.

Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.1
Return to top
Show: