System.IO.Ports Namespace

The System.IO.Ports namespace contains classes for controlling serial ports. The most important class, System.IO.Ports.SerialPort, provides a framework for synchronous and event-driven I/O, access to pin and break states, and access to serial driver properties. It can be used to wrap a System.IO.Stream objects, allowing the serial port to be accessed by classes that use streams.

Remarks

The namespace includes enumerations that simplify the control of serial ports, such as System.IO.Ports.Handshake, System.IO.Ports.Parity, System.IO.Ports.SerialPinChange, and System.IO.Ports.StopBits.

Classes

TypeReason
Handshake

Specifies the control protocol used in establishing a serial port communication for a System.IO.Ports.SerialPort object.

Parity

Specifies the parity bit for a System.IO.Ports.SerialPort object.

SerialData

Specifies the type of character that was received on the serial port of the System.IO.Ports.SerialPort object.

SerialDataReceivedEventArgs

Provides data for the System.IO.Ports.SerialPort.DataReceived event.

SerialDataReceivedEventHandler

Represents the method that will handle the System.IO.Ports.SerialPort.DataReceived event of a System.IO.Ports.SerialPort object.

SerialError

Specifies errors that occur on the System.IO.Ports.SerialPort object.

SerialErrorReceivedEventArgs

Prepares data for the System.IO.Ports.SerialPort.ErrorReceived event.

SerialErrorReceivedEventHandler

Represents the method that will handle the System.IO.Ports.SerialPort.ErrorReceived event of a System.IO.Ports.SerialPort object.

SerialPinChange

Specifies the type of change that occurred on the System.IO.Ports.SerialPort object.

SerialPinChangedEventArgs

Provides data for the System.IO.Ports.SerialPort.PinChanged event.

SerialPinChangedEventHandler

Represents the method that will handle the System.IO.Ports.SerialPort.PinChanged event of a System.IO.Ports.SerialPort object.

SerialPort

Represents a serial port resource.

StopBits

Specifies the number of stop bits used on the System.IO.Ports.SerialPort object.