22 out of 47 rated this helpful - Rate this topic

System.IO.Ports Namespace

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

The System.IO.Ports namespace contains classes for controlling serial ports. The most important class, 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 Stream objects, allowing the serial port to be accessed by classes that use streams.

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

  Class Description
Public class SerialDataReceivedEventArgs Provides data for the DataReceived event.
Public class SerialErrorReceivedEventArgs Prepares data for the ErrorReceived event.
Public class SerialPinChangedEventArgs Provides data for the PinChanged event.
Public class SerialPort Represents a serial port resource.
  Delegate Description
Public delegate SerialDataReceivedEventHandler Represents the method that will handle the DataReceived event of a SerialPort object.
Public delegate SerialErrorReceivedEventHandler Represents the method that will handle the ErrorReceived event of a SerialPort object.
Public delegate SerialPinChangedEventHandler Represents the method that will handle the PinChanged event of a SerialPort object.
  Enumeration Description
Public enumeration Handshake Specifies the control protocol used in establishing a serial port communication for a SerialPort object.
Public enumeration Parity Specifies the parity bit for a SerialPort object.
Public enumeration SerialData Specifies the type of character that was received on the serial port of the SerialPort object.
Public enumeration SerialError Specifies errors that occur on the SerialPort object
Public enumeration SerialPinChange Specifies the type of change that occurred on the SerialPort object.
Public enumeration StopBits Specifies the number of stop bits used on the SerialPort object.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ