This documentation is archived and is not being maintained.

SerialPort.WriteBufferSize Property

Note: This property is new in the .NET Framework version 2.0.

Gets or sets the size of the serial port output buffer.

Namespace: System.IO.Ports
Assembly: System (in system.dll)

public int WriteBufferSize { get; set; }
/** @property */
public int get_WriteBufferSize ()

/** @property */
public void set_WriteBufferSize (int value)

public function get WriteBufferSize () : int

public function set WriteBufferSize (value : int)

Property Value

The size of the output buffer. The default is 2048.

Exception typeCondition

ArgumentOutOfRangeException

The WriteBufferSize value is less than or equal to zero.

InvalidOperationException

The WriteBufferSize property was set while the stream was open.

IOException

The WriteBufferSize property was set to an odd integer value.

The WriteBufferSize property ignores any value smaller than 2048.

Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows CE Platform Note: On Windows CE, the buffer sizes passed are only recommendations, not requirements of the serial driver. The serial driver may ignore the recommended buffer sizes.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

.NET Compact Framework

Supported in: 2.0
Show: