System 2.0.0.0 4.0.0.0 System.ComponentModel.Component System.Diagnostics.MonitoringDescription("")

Use this class to control a serial port file resource. This class provides synchronous and event-driven I/O, access to pin and break states, and access to serial driver properties. Additionally, the functionality of this class can be wrapped in an internal object, accessible through the property, and passed to classes that wrap or use streams.

The class supports the following encodings: , , , , and any encoding defined in mscorlib.dll where the code page is less than 50000 or the code page is 54936. You can use alternate encodings, but you must use the or method and perform the encoding yourself.

You use the method to retrieve the valid ports for the current computer.

If a object becomes blocked during a read operation, do not abort the thread. Instead, either close the base stream or dispose of the object.

Represents a serial port resource.

- Constructor
  2.0.0.0
  4.0.0.0

  This constructor uses default property values when none are specified. For example, the property defaults to 8, the property defaults to the None enumeration value, the property defaults to 1, and a default port name of COM1.

  Initializes a new instance of the class.

- Constructor
  2.0.0.0
  4.0.0.0

  This constructor uses default property values when none are specified. For example, the property defaults to 8, the property defaults to the None enumeration value, the property defaults to 1, and a default port name of COM1.

  Initializes a new instance of the class using the specified object.

  An interface to a container.
- Constructor
  2.0.0.0
  4.0.0.0

  Use this constructor to create a new instance of the class when you want to specify the port name.

  Initializes a new instance of the class using the specified port name.

  The port to use (for example, COM1).
- Constructor
  2.0.0.0
  4.0.0.0

  Use this constructor to create a new instance of the class when you want to specify the port name and the baud rate.

  Initializes a new instance of the class using the specified port name and baud rate.

  The port to use (for example, COM1).
  The baud rate.
- Constructor
  2.0.0.0
  4.0.0.0

  Use this constructor to create a new instance of the class when you want to specify the port name, the baud rate, and the parity bit.

  Initializes a new instance of the class using the specified port name, baud rate, and parity bit.

  The port to use (for example, COM1).
  The baud rate.
  One of the values.
- Constructor
  2.0.0.0
  4.0.0.0

  Use this constructor to create a new instance of the class when you want to specify the port name, the baud rate, the parity bit, and data bits.

  Initializes a new instance of the class using the specified port name, baud rate, parity bit, and data bits.

  The port to use (for example, COM1).
  The baud rate.
  One of the values.
  The data bits value.
- Constructor
  2.0.0.0
  4.0.0.0

  Use this constructor to create a new instance of the class when you want to specify the port name, the baud rate, the parity bit, data bits, and stop bit.

  Initializes a new instance of the class using the specified port name, baud rate, parity bit, data bits, and stop bit.

  The port to use (for example, COM1).
  The baud rate.
  One of the values.
  The data bits value.
  One of the values.
- Property
  2.0.0.0
  4.0.0.0
  System.ComponentModel.Browsable(false)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.IO.Stream To be added.

  Use this property for explicit asynchronous I/O operations or to pass the object to a wrapper class such as .

  Any open serial port's property returns an object that derives from the abstract class, and implements read and write methods using the prototypes inherited from the class: , , , , , and . These methods can be useful when passing a wrapped serial resource to a wrapper class.

  Due to the inaccessibility of the wrapped file handle, the and properties are not supported, and the and methods are not supported.

  Gets the underlying object for a object.

- Property
  2.0.0.0
  4.0.0.0
  System.ComponentModel.Browsable(true)
  System.ComponentModel.DefaultValue(9600)
  System.Diagnostics.MonitoringDescription("")
  System.Int32 To be added.

  The baud rate must be supported by the user's serial driver. The default value is 9600 bits per second (bps).

  Gets or sets the serial baud rate.

- Property
  2.0.0.0
  4.0.0.0
  System.ComponentModel.Browsable(false)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.Boolean To be added.

  The break signal state occurs when a transmission is suspended and the line is placed in a break state (all low, no stop bit) until released. To enter a break state, set this property to true. If the port is already in a break state, setting this property again to true does not result in an exception. It is not possible to write to the object while is true.

  Gets or sets the break signal state.

- Property
  2.0.0.0
  4.0.0.0
  System.ComponentModel.Browsable(false)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.Int32 To be added.

  The receive buffer includes the serial driver's receive buffer as well as internal buffering in the object itself.

  Because the property represents both the buffer and the Windows-created buffer, it can return a greater value than the property, which represents only the Windows-created buffer.

  Gets the number of bytes of data in the receive buffer.

- Property
  2.0.0.0
  4.0.0.0
  System.ComponentModel.Browsable(false)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.Int32 To be added.

  The send buffer includes the serial driver's send buffer as well as internal buffering in the object itself.

  Gets the number of bytes of data in the send buffer.

- Property
  2.0.0.0
  4.0.0.0
  System.ComponentModel.Browsable(false)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.Boolean To be added.

  This property can be used to monitor the state of the carrier detection line for a port. No carrier usually indicates that the receiver has hung up and the carrier has been dropped.

  Gets the state of the Carrier Detect line for the port.

- Method
  2.0.0.0
  4.0.0.0
  System.Void

  Calling this method closes the object and clears both the receive and transmit buffers. This method calls the method, which invokes the protected method with the parameter set to true.

  The best practice for any application is to wait for some amount of time after calling the method before attempting to call the method, as the port may not be closed instantly.

  Closes the port connection, sets the property to false, and disposes of the internal object.

- Property
  2.0.0.0
  4.0.0.0
  System.ComponentModel.Browsable(false)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.Boolean To be added.

  The Clear-to-Send (CTS) line is used in Request to Send/Clear to Send (RTS/CTS) hardware handshaking. The CTS line is queried by a port before data is sent.

  Gets the state of the Clear-to-Send line.

- Property
  2.0.0.0
  4.0.0.0
  System.ComponentModel.Browsable(true)
  System.ComponentModel.DefaultValue(8)
  System.Diagnostics.MonitoringDescription("")
  System.Int32 To be added.

  The range of values for this property is from 5 through 8. The default value is 8.

  Gets or sets the standard length of data bits per byte.

- Event
  2.0.0.0
  4.0.0.0
  System.Diagnostics.MonitoringDescription("")
  System.IO.Ports.SerialDataReceivedEventHandler

  Serial received events can be caused by any of the items in the enumeration. Because the operating system determines whether to raise this event or not, not all parity errors may be reported.

  , , and events may be called out of order, and there may be a slight delay between when the underlying stream reports the error and when the event handler is executed. Only one event handler can execute at a time.

  The event is not guaranteed to be raised for every byte received. Use the property to determine how much data is left to be read in the buffer.

  The event is raised on a secondary thread when data is received from the object. Because this event is raised on a secondary thread, and not the main thread, attempting to modify some elements in the main thread, such as UI elements, could raise a threading exception. If it is necessary to modify elements in the main or , post change requests back using , which will do the work on the proper thread.

  For more information about handling events, see Handling and Raising Events.

  Represents the method that will handle the data received event of a object.

- Method
  2.0.0.0
  4.0.0.0
  System.Void

  This method is equivalent to the following Visual Basic code: MSComm1.InBufferCount = 0. It clears the receive buffer, but does not affect the transmit buffer.

  Discards data from the serial driver's receive buffer.

- Property
  2.0.0.0
  4.0.0.0
  System.ComponentModel.Browsable(true)
  System.ComponentModel.DefaultValue(false)
  System.Diagnostics.MonitoringDescription("")
  System.MonoTODO("Not implemented")
  System.Boolean To be added.

  This value should normally be set to false, especially for binary transmissions. Setting this property to true can cause unexpected results for UTF32- and UTF16-encoded bytes.

  Gets or sets a value indicating whether null bytes are ignored when transmitted between the port and the receive buffer.

- Method
  2.0.0.0
  4.0.0.0
  System.Void

  This method is equivalent to the following Visual Basic code: MSComm1.OutBufferCount = 0. It clears the transmit buffer, but does not affect the receive buffer.

  Discards data from the serial driver's transmit buffer.

- Method
  2.0.0.0
  4.0.0.0
  System.Void ``

  This method is called by the public method and the method. invokes the protected method with the parameter set to true. invokes with set to false.

  When the parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the method of each referenced object.

  This method flushes and closes the stream object in the property.

  Releases the unmanaged resources used by the and optionally releases the managed resources.

  true to release both managed and unmanaged resources; false to release only unmanaged resources.
- Property
  2.0.0.0
  4.0.0.0
  System.ComponentModel.Browsable(false)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.Boolean To be added.

  This property is used in Data Set Ready/Data Terminal Ready (DSR/DTR) handshaking. The Data Set Ready (DSR) signal is usually sent by a modem to a port to indicate that it is ready for data transmission or data reception.

  Gets the state of the Data Set Ready (DSR) signal.

- Property
  2.0.0.0
  4.0.0.0
  System.ComponentModel.Browsable(true)
  System.ComponentModel.DefaultValue(false)
  System.Diagnostics.MonitoringDescription("")
  System.Boolean To be added.

  Data Terminal Ready (DTR) is typically enabled during XON/XOFF software handshaking and Request to Send/Clear to Send (RTS/CTS) hardware handshaking, and modem communications.

  Gets or sets a value that enables the Data Terminal Ready (DTR) signal during serial communication.

- Property
  2.0.0.0
  4.0.0.0
  System.ComponentModel.Browsable(false)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.Diagnostics.MonitoringDescription("")
  System.Text.Encoding To be added. To be added.

  Gets or sets the byte encoding for pre- and post-transmission conversion of text.

- Event
  2.0.0.0
  4.0.0.0
  System.Diagnostics.MonitoringDescription("")
  System.IO.Ports.SerialErrorReceivedEventHandler

  Error events can be caused by any of the items in the enumeration. Because the operating system determines whether to raise this event or not, not all parity errors may be reported.

  , , and events may be called out of order, and there may be a slight delay between when the underlying stream reports the error and when code can when the event handler is executed. Only one event handler can execute at a time.

  If a parity error occurs on the trailing byte of a stream, an extra byte will be added to the input buffer with a value of 126.

  The event is raised on a secondary thread when an error is received from the object. Because this event is raised on a secondary thread, and not the main thread, attempting to modify some elements in the main thread, such as UI elements, could raise a threading exception. If it is necessary to modify elements in the main or , post change requests back using , which will do the work on the proper thread.

  For more information about handling events, see Handling and Raising Events.

  Represents the method that handles the error event of a object.

- Method
  2.0.0.0
  4.0.0.0
  System.String[]

  The order of port names returned from is not specified.

  Use the method to query the current computer for a list of valid serial port names. For example, you can use this method to determine whether COM1 and COM2 are valid serial ports for the current computer.

  The port names are obtained from the system registry (for example, HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM). If the registry contains stale or otherwise incorrect data then the method will return incorrect data.

  Gets an array of serial port names for the current computer.

  An array of serial port names for the current computer.

- Property
  2.0.0.0
  4.0.0.0
  System.ComponentModel.Browsable(true)
  System.ComponentModel.DefaultValue(Mono.Cecil.CustomAttributeArgument)
  System.Diagnostics.MonitoringDescription("")
  System.IO.Ports.Handshake To be added.

  When handshaking is used, the device connected to the object is instructed to stop sending data when there is at least (-1024) bytes in the buffer. The device is instructed to start sending data again when there are 1024 or fewer bytes in the buffer. If the device is sending data in blocks that are larger than 1024 bytes, this may cause the buffer to overflow.

  If the property is set to and is set to false, the XOff character will not be sent. If is then set to true, more data must be sent before the XOff character will be sent.

  Gets or sets the handshaking protocol for serial port transmission of data.

- Field
  2.0.0.0
  4.0.0.0
  System.Int32 -1

  This value is used with the and properties.

  Indicates that no time-out should occur.

- Property
  2.0.0.0
  4.0.0.0
  System.ComponentModel.Browsable(false)
  System.Boolean To be added.

  The property tracks whether the port is open for use by the caller, not whether the port is open by any application on the machine.

  Gets a value indicating the open or closed status of the object.

- Property
  2.0.0.0
  4.0.0.0
  System.ComponentModel.Browsable(false)
  System.ComponentModel.DefaultValue(" ")
  System.Diagnostics.MonitoringDescription("")
  System.String To be added.

  This property defines the end of a line for the and methods.

  Gets or sets the value used to interpret the end of a call to the and methods.

- Method
  2.0.0.0
  4.0.0.0
  System.Void

  Only one open connection can exist per object.

  The best practice for any application is to wait for some amount of time after calling the method before attempting to call the method, as the port may not be closed instantly.

  Opens a new serial port connection.

- Property
  2.0.0.0
  4.0.0.0
  System.ComponentModel.Browsable(true)
  System.ComponentModel.DefaultValue(Mono.Cecil.CustomAttributeArgument)
  System.Diagnostics.MonitoringDescription("")
  System.IO.Ports.Parity To be added.

  Parity is an error-checking procedure in which the number of 1s must always be the same—either even or odd—for each group of bits that is transmitted without error. In modem-to-modem communications, parity is often one of the parameters that must be agreed upon by sending parties and receiving parties before transmission can take place.

  If a parity error occurs on the trailing byte of a stream, an extra byte will be added to the input buffer with a value of 126.

  Gets or sets the parity-checking protocol.

- Property
  2.0.0.0
  4.0.0.0
  System.ComponentModel.Browsable(true)
  System.ComponentModel.DefaultValue(63)
  System.Diagnostics.MonitoringDescription("")
  System.MonoTODO("Not implemented")
  System.Byte To be added.

  If the value is set to the null character, parity replacement is disabled.

  Gets or sets the byte that replaces invalid bytes in a data stream when a parity error occurs.

- Event
  2.0.0.0
  4.0.0.0
  System.Diagnostics.MonitoringDescription("")
  System.IO.Ports.SerialPinChangedEventHandler

  Serial pin changed events can be caused by any of the items in the enumeration. Because the operating system determines whether to raise this event or not, not all parity errors may be reported. As part of the event, the new value of the pin is set.

  The event is raised when a object enters the , but not when the port exits the . This behavior does not apply to other values in the enumeration.

  , , and events may be called out of order, and there may be a slight delay between when the underlying stream reports the error and when the event handler is executed. Only one event handler can execute at a time.

  The event is raised on a secondary thread. Because this event is raised on a secondary thread, and not the main thread, attempting to modify some elements in the main thread, such as UI elements, could raise a threading exception. If it is necessary to modify elements in the main or , post change requests back using , which will do the work on the proper thread.

  For more information about handling events, see Handling and Raising Events.

  Represents the method that will handle the serial pin changed event of a object.

- Property
  2.0.0.0
  4.0.0.0
  System.ComponentModel.Browsable(true)
  System.ComponentModel.DefaultValue("COM1")
  System.Diagnostics.MonitoringDescription("")
  System.String To be added.

  A list of valid port names can be obtained using the method.

  Gets or sets the port for communications, including but not limited to all available COM ports.

- Method
  2.0.0.0
  4.0.0.0
  System.Int32 `` `` ``

  If it is necessary to switch between reading text and reading binary data from the stream, select a protocol that carefully defines the boundary between text and binary data, such as manually reading bytes and decoding the data.

  Because the class buffers data, and the stream contained in the property does not, the two might conflict about how many bytes are available to read. The property can indicate that there are bytes to read, but these bytes might not be accessible to the stream contained in the property because they have been buffered to the class.

  The method does not block other operations when the number of bytes read equals but there are still unread bytes available on the serial port.

  Reads a number of bytes from the input buffer and writes those bytes into a byte array at the specified offset.

  The number of bytes read.

  The byte array to write the input to. The offset in the buffer array to begin reading from. The number of bytes to read.
- Method
  2.0.0.0
  4.0.0.0
  System.Int32 `` `` ``

  Use this method for reading characters from the serial port.

  If it is necessary to switch between reading text and reading binary data from the stream, select a protocol that carefully defines the boundary between text and binary data, such as manually reading bytes and decoding the data.

  Because the class buffers data, and the stream contained in the property does not, the two might conflict about how many characters are available to read. The property can indicate that there are characters to read, but these characters might not be accessible to the stream contained in the property because they have been buffered to the class.

  The method does not block other operations when the number of bytes read equals but there are still unread bytes available on the serial port.

  Reads a number of characters from the input buffer and writes them into an array of characters at a given offset.

  The number of characters read.

  The character array to write the input to. The offset in the buffer array to begin reading from. The number of characters to read.
- Property
  2.0.0.0
  4.0.0.0
  System.ComponentModel.Browsable(true)
  System.ComponentModel.DefaultValue(4096)
  System.Diagnostics.MonitoringDescription("")
  System.Int32 To be added.

  The property ignores any value smaller than 4096.

  Because the property represents only the Windows-created buffer, it can return a smaller value than the property, which represents both the buffer and the Windows-created buffer.

  Gets or sets the size of the input buffer.

- Method
  2.0.0.0
  4.0.0.0
  System.Int32

  This method reads one byte.

  Use caution when using and together. Switching between reading bytes and reading characters can cause extra data to be read and/or other unintended behavior. If it is necessary to switch between reading text and reading binary data from the stream, select a protocol that carefully defines the boundary between text and binary data, such as manually reading bytes and decoding the data.

  Because the class buffers data, and the stream contained in the property does not, the two might conflict about how many bytes are available to read. The property can indicate that there are bytes to read, but these bytes might not be accessible to the stream contained in the property because they have been buffered to the class.

  Synchronously reads one byte from the input buffer.

  The byte, cast to an , or -1 if the end of the stream has been read.

- Method
  2.0.0.0
  4.0.0.0
  System.Int32

  This method reads one complete character based on the encoding.

  Use caution when using and together. Switching between reading bytes and reading characters can cause extra data to be read and/or other unintended behavior. If it is necessary to switch between reading text and reading binary data from the stream, select a protocol that carefully defines the boundary between text and binary data, such as manually reading bytes and decoding the data.

  Because the class buffers data, and the stream contained in the property does not, the two might conflict about how many bytes are available to read. The property can indicate that there are bytes to read, but these bytes might not be accessible to the stream contained in the property because they have been buffered to the class.

  Synchronously reads one character from the input buffer.

  The character that was read.

- Method
  2.0.0.0
  4.0.0.0
  System.String

  This method returns the contents of the stream and internal buffer of the object as a string. This method does not use a time-out. Note that this method can leave trailing lead bytes in the internal buffer, which makes the value greater than zero.

  If it is necessary to switch between reading text and reading binary data from the stream, select a protocol that carefully defines the boundary between text and binary data, such as manually reading bytes and decoding the data.

  The class buffers data, but the stream object contained in the property does not. Therefore, the object and the stream object might differ on the number of bytes that are available to read. When bytes are buffered to the object, the property includes these bytes in its value; however, these bytes might not be accessible to the stream contained in the property.

  Reads all immediately available bytes, based on the encoding, in both the stream and the input buffer of the object.

  The contents of the stream and the input buffer of the object.

- Method
  2.0.0.0
  4.0.0.0
  System.String

  Note that while this method does not return the value, the value is removed from the input buffer.

  By default, the method will block until a line is received. If this behavior is undesirable, set the property to any non-zero value to force the method to throw a if a line is not available on the port.

  If it is necessary to switch between reading text and reading binary data from the stream, select a protocol that carefully defines the boundary between text and binary data, such as manually reading bytes and decoding the data.

  Because the class buffers data, and the stream contained in the property does not, the two might conflict about how many bytes are available to read. The property can indicate that there are bytes to read, but these bytes might not be accessible to the stream contained in the property because they have been buffered to the class.

  Reads up to the value in the input buffer.

  The contents of the input buffer up to the first occurrence of a value.

- Property
  2.0.0.0
  4.0.0.0
  System.ComponentModel.Browsable(true)
  System.ComponentModel.DefaultValue(-1)
  System.Diagnostics.MonitoringDescription("")
  System.Int32 To be added.

  The read time-out value was originally set at 500 milliseconds in the Win32 Communications API. This property allows you to set this value. The time-out can be set to any value greater than zero, or set to , in which case no time-out occurs. is the default.

  Users of the unmanaged COMMTIMEOUTS structure might expect to set the time-out value to zero to suppress time-outs. To suppress time-outs with the property, however, you must specify .

  This property does not affect the method of the stream returned by the property.

  Gets or sets the number of milliseconds before a time-out occurs when a read operation does not finish.

- Method
  2.0.0.0
  4.0.0.0
  System.String ``

  This method reads a string up to the specified . While the returned string does not include the , the is removed from the input buffer.

  If it is necessary to switch between reading text and reading binary data from the stream, select a protocol that carefully defines the boundary between text and binary data, such as manually reading bytes and decoding the data.

  Because the class buffers data, and the stream contained in the property does not, the two might conflict about how many bytes are available to read. The property can indicate that there are bytes to read, but these bytes might not be accessible to the stream contained in the property because they have been buffered to the class.

  Reads a string up to the specified in the input buffer.

  The contents of the input buffer up to the specified .

  A value that indicates where the read operation stops.
- Property
  2.0.0.0
  4.0.0.0
  System.ComponentModel.Browsable(true)
  System.ComponentModel.DefaultValue(1)
  System.Diagnostics.MonitoringDescription("")
  System.MonoTODO("Not implemented")
  System.Int32 To be added.

  The event is also raised if an character is received, regardless of the number of bytes in the internal input buffer and the value of the property.

  Gets or sets the number of bytes in the internal input buffer before a event occurs.

- Property
  2.0.0.0
  4.0.0.0
  System.ComponentModel.Browsable(true)
  System.ComponentModel.DefaultValue(false)
  System.Diagnostics.MonitoringDescription("")
  System.Boolean To be added.

  The Request to Transmit (RTS) signal is typically used in Request to Send/Clear to Send (RTS/CTS) hardware handshaking.

  Gets or sets a value indicating whether the Request to Send (RTS) signal is enabled during serial communication.

- Property
  2.0.0.0
  4.0.0.0
  System.ComponentModel.Browsable(true)
  System.ComponentModel.DefaultValue(Mono.Cecil.CustomAttributeArgument)
  System.Diagnostics.MonitoringDescription("")
  System.IO.Ports.StopBits To be added.

  The default value for is .

  The value is not supported.

  Gets or sets the standard number of stopbits per byte.

- Method
  2.0.0.0
  4.0.0.0
  System.Void `` To be added.

  Use this method when you want to write a string as output to a serial port.

  If there are too many bytes in the output buffer and is set to then the object may raise a while it waits for the device to be ready to accept more data.

  By default, uses to encode the characters. encodes all characters greater than 127 as (char)63 or '?'. To support additional characters in that range, set to , , or .

  Writes the specified string to the serial port.

- Method
  2.0.0.0
  4.0.0.0
  System.Void `` `` ``

  Use this method when you want to write to a byte buffer to create output to a serial port.

  If there are too many bytes in the output buffer and is set to then the object may raise a while it waits for the device to be ready to accept more data.

  By default, uses to encode the characters. encodes all characters greater than 127 as (char)63 or '?'. To support additional characters in that range, set to , , or .

  Writes a specified number of bytes to the serial port using data from a buffer.

  The byte array that contains the data to write to the port. The zero-based byte offset in the parameter at which to begin copying bytes to the port. The number of bytes to write.
- Method
  2.0.0.0
  4.0.0.0
  System.Void `` `` ``

  Use this method when you want to write to a character buffer to create output to a serial port.

  If there are too many bytes in the output buffer and is set to then the object may raise a while it waits for the device to be ready to accept more data.

  By default, uses to encode the characters. encodes all characters greater than 127 as (char)63 or '?'. To support additional characters in that range, set to , , or .

  Writes a specified number of characters to the serial port using data from a buffer.

  The character array that contains the data to write to the port. The zero-based byte offset in the parameter at which to begin copying bytes to the port. The number of characters to write.
- Property
  2.0.0.0
  4.0.0.0
  System.ComponentModel.Browsable(true)
  System.ComponentModel.DefaultValue(2048)
  System.Diagnostics.MonitoringDescription("")
  System.Int32 To be added.

  The property ignores any value smaller than 2048.

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

- Method
  2.0.0.0
  4.0.0.0
  System.Void `` To be added.

  If there are too many bytes in the input buffer and is set to then the object may raise a while it waits for the device to be ready to accept more data.

  The written output includes the string.

  Writes the specified string and the value to the output buffer.

- Property
  2.0.0.0
  4.0.0.0
  System.ComponentModel.Browsable(true)
  System.ComponentModel.DefaultValue(-1)
  System.Diagnostics.MonitoringDescription("")
  System.Int32 To be added.

  The write time-out value was originally set at 500 milliseconds in the Win32 Communications API. This property allows you to set this value. The time-out can be set to any value greater than zero, or set to , in which case no time-out occurs. is the default.

  Users of the unmanaged COMMTIMEOUTS structure might expect to set the time-out value to zero to suppress time-outs. To suppress time-outs with the property, however, you must specify .

  This property does not affect the method of the stream returned by the property.

  Gets or sets the number of milliseconds before a time-out occurs when a write operation does not finish.