System.IO.Ports.SerialPort: Property Members

The properties of System.IO.Ports.SerialPort are listed below. For a list of all members, see the SerialPort Members list.

See Also: Inherited members from System.ComponentModel.Component

Public Properties

[read-only]
BaseStreamSystem.IO.Stream.

Gets the underlying System.IO.Stream object for a System.IO.Ports.SerialPort object.

BaudRateint.

Gets or sets the serial baud rate.

BreakStatebool.

Gets or sets the break signal state.

[read-only]
BytesToReadint.

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

[read-only]
BytesToWriteint.

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

[read-only]
CDHoldingbool.

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

[read-only]
CtsHoldingbool.

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

DataBitsint.

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

DiscardNullbool.

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

[read-only]
DsrHoldingbool.

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

DtrEnablebool.

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

EncodingSystem.Text.Encoding.

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

HandshakeHandshake.

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

[read-only]
IsOpenbool.

Gets a value indicating the open or closed status of the System.IO.Ports.SerialPort object.

NewLinestring.

Gets or sets the value used to interpret the end of a call to the SerialPort.ReadLine and SerialPort.WriteLine(string) methods.

ParityParity.

Gets or sets the parity-checking protocol.

ParityReplacebyte.

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

PortNamestring.

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

ReadBufferSizeint.

Gets or sets the size of the System.IO.Ports.SerialPort input buffer.

ReadTimeoutint.

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

ReceivedBytesThresholdint.

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

RtsEnablebool.

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

StopBitsStopBits.

Gets or sets the standard number of stopbits per byte.

WriteBufferSizeint.

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

WriteTimeoutint.

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