SerialPortSettings Members
The SerialPortSettings type exposes the following members.
Methods
Name | Description | |
---|---|---|
![]() |
Equals(System.Object) | (Inherited from Object.) |
![]() |
Finalize | (Inherited from Object.) |
![]() |
GetHashCode | (Inherited from Object.) |
![]() |
GetType | (Inherited from Object.) |
![]() |
MemberwiseClone | (Inherited from Object.) |
![]() |
ToString | (Inherited from Object.) |
Properties
Name | Description | |
---|---|---|
![]() |
BaudRate |
Gets or sets the serial baud rate.
|
![]() |
DataBits |
Gets or sets the standard length of data bits per byte.
|
![]() |
Parity |
Summary:
Gets or sets the parity-checking protocol.
Returns:
One of the System.IO.Ports.Parity values that represents the parity-checking
protocol. The default is None.
Exceptions:
System.IO.IOException:
The port is in an invalid state. - or - An attempt to set the state of the
underlying port failed. For example, the parameters passed from this System.IO.Ports.SerialPort
object were invalid.
System.ArgumentOutOfRangeException:
The System.IO.Ports.SerialPort.Parity value passed is not a valid value in
the System.IO.Ports.Parity enumeration.
|
![]() |
PortName |
Summary:
Gets or sets the port for communications, including but not limited to all
available COM ports.
Returns:
The communications port. The default is COM1.
Exceptions:
System.ArgumentNullException:
The System.IO.Ports.SerialPort.PortName property was set to null.
System.ArgumentException:
The System.IO.Ports.SerialPort.PortName property was set to a value with
a length of zero.-or-The System.IO.Ports.SerialPort.PortName property was
set to a value that starts with "\\".-or-The port name was not valid.
System.InvalidOperationException:
The specified port is open.
|
![]() |
StopBits |
Summary:
Gets or sets the standard number of stopbits per byte.
Returns:
One of the System.IO.Ports.StopBits values.
Exceptions:
System.ArgumentOutOfRangeException:
The System.IO.Ports.SerialPort.StopBits value is not one of the values from
the System.IO.Ports.StopBits enumeration.
System.IO.IOException:
The port is in an invalid state. - or - An attempt to set the state of the
underlying port failed. For example, the parameters passed from this System.IO.Ports.SerialPort
object were invalid.
|