This documentation is archived and is not being maintained.

SocketAddress Constructor (AddressFamily, Int32)

.NET Framework 1.1

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

[Visual Basic]
Public Sub New( _
   ByVal family As AddressFamily, _
   ByVal size As Integer _
)
[C#]
public SocketAddress(
   AddressFamily family,
 int size
);
[C++]
public: SocketAddress(
   AddressFamily family,
 int size
);
[JScript]
public function SocketAddress(
   family : AddressFamily,
 size : int
);

Parameters

family
An AddressFamily enumerated value.
size
The number of bytes to allocate for the underlying buffer.

Exceptions

Exception Type Condition
ArgumentOutOfRangeException size is less than 2. These two bytes are needed to store family.

Remarks

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

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

SocketAddress Class | SocketAddress Members | System.Net Namespace | SocketAddress Constructor Overload List

Show: