Creates a new Serial Port
Namespace: SerialPortNETAssembly: SerialPortNET (in SerialPortNET.dll) Version: 1.0.0.0 (1.0.0.0)
Syntaxpublic SerialPort(
string portName,
int baudRate,
Parity parity,
byte dataBits,
StopBits stopBits
)
Public Sub New (
portName As String,
baudRate As Integer,
parity As Parity,
dataBits As Byte,
stopBits As StopBits
)
public:
SerialPort(
String^ portName,
int baudRate,
Parity parity,
unsigned char dataBits,
StopBits stopBits
)
new :
portName : string *
baudRate : int *
parity : Parity *
dataBits : byte *
stopBits : StopBits -> SerialPortParameters
- portName
- Type: SystemString
Name of the port (COM1, ...) - baudRate
- Type: SystemInt32
Baud rate (9600, 115200, ...) - parity
- Type: SerialPortNETParity
Parity - dataBits
- Type: SystemByte
Number of data bits (7, 8, ...) - stopBits
- Type: SerialPortNETStopBits
Stop bits
See Also