SerialDevice.Parity Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the parity bit for error-checking.
public:
property SerialParity Parity { SerialParity get(); void set(SerialParity value); };
SerialParity Parity();
void Parity(SerialParity value);
public SerialParity Parity { get; set; }
var serialParity = serialDevice.parity;
serialDevice.parity = serialParity;
Public Property Parity As SerialParity
Property Value
One of the values defined in SerialParity enumeration.
Remarks
In serial communication, the parity bit is used as an error-checking procedure. In data transmission that uses parity checking, the bit format is 7 data bits-x-1 stop bit, where x is the parity bit. That bit indicates whether the number of 1s in the data byte is even or odd. The parity bit can be E (even), O (odd), M (mark), or S (space). Those values are defined in the SerialParity enumeration.
For example, if the format is 7-E-1 and the data bits are 0001000, the parity bit is set to 1 to make sure there are even number of 1s.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for