SerialPort Constructor (String, Int32, Parity, Int32)

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

Namespace: System.IO.Ports
Assembly: Microsoft.SPOT.Hardware (in microsoft.spot.hardware.dll)

Syntax

public SerialPort (
         stringportName,
         intbaudRate,
         Parityparity,
         intdataBits
)

Parameters

  • portName
    The port to use (for example, COM1).
  • baudRate
    The baud rate.
  • parity
    One of the Parity values.
  • dataBits
    The data bits value.

Remarks

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

Version Information

Available in the .NET Micro Framework versions 3.0, 4.0, and 4.1.

See Also

Reference

SerialPort Class
SerialPort Members
System.IO.Ports Namespace