Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The following tables list the members exposed by the SerialPort type.
Public Constructors
| Name | Description | |
|---|---|---|
![]() |
SerialPort | Overloaded. Initializes a new instance of the SerialPort class. |
Public Destructors
| Name | Description | |
|---|---|---|
![]() |
~SerialPort | Deletes an instance of the SerialPort class. |
Public Properties
| Name | Description | |
|---|---|---|
![]() |
BaudRate | Gets or sets the serial baud rate. |
![]() |
BytesToRead | Gets the number of bytes of data in the receive buffer. |
![]() |
BytesToWrite | Gets the number of bytes of data in the send buffer. |
![]() |
DataBits | Gets or sets the standard length of data bits per byte. |
![]() |
Handshake | Gets or sets the handshaking protocol for serial port transmission of data. |
![]() |
IsOpen | Gets a value indicating the open or closed status of the SerialPort object. |
![]() |
Parity | Gets or sets the parity-checking protocol. |
![]() |
PortName | Gets or sets the port for communications, including but not limited to all available COM ports. |
![]() |
ReadTimeout | Gets or sets the number of milliseconds before a time-out occurs when a read operation does not finish. |
![]() |
StopBits | Gets or sets the standard number of stopbits per byte. |
![]() |
WriteTimeout | Gets or sets the number of milliseconds before a time-out occurs when a write operation does not finish. |
Public Methods
| Name | Description | |
|---|---|---|
![]() |
Close | Closes the port connection, sets the IsOpen property to false, and disposes of the internal Stream object. |
![]() |
DiscardInBuffer | Discards data from the serial driver's receive buffer. |
![]() |
DiscardOutBuffer | Discards data from the serial driver's transmit buffer. |
![]() |
Dispose | Releases the unmanaged resources used by the SerialPort object. |
![]() |
Flush | Sends any data waiting in the send buffer of this SerialPort and clears the buffer. |
![]() |
Open | Opens a new serial port connection. |
![]() |
Read | Reads a number of bytes from the SerialPort input buffer and writes those bytes into a byte array at the specified offset. |
![]() |
Write | Writes a specified number of bytes to the serial port using data from a buffer. |
Public Events
| Name | Description | |
|---|---|---|
![]() |
DataReceived | Represents the method that will handle the data received event of a SerialPort object. |
![]() |
ErrorReceived | Represents the method that handles the error event of a SerialPort object. |
.gif)
.gif)
.gif)