Export (0) Print
Expand All
0 out of 22 rated this helpful - Rate this topic

Parity Enumeration

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

Specifies the parity bit for a SerialPort object.

Namespace: System.IO.Ports
Assembly: System (in system.dll)

public enum Parity
public enum Parity
public enum Parity
 Member nameDescription
Supported by the .NET Compact FrameworkEvenSets the parity bit so that the count of bits set is an even number. 
Supported by the .NET Compact FrameworkMarkLeaves the parity bit set to 1. 
Supported by the .NET Compact FrameworkNoneNo parity check occurs. 
Supported by the .NET Compact FrameworkOddSets the parity bit so that the count of bits set is an odd number. 
Supported by the .NET Compact FrameworkSpaceLeaves the parity bit set to 0. 

Use this enumeration when setting the Parity property for a serial port connection.

Parity is an error-checking procedure in which the number of 1s must always be the same—either even or odd—for each group of bits that is transmitted without error. In modem-to-modem communications, parity is often one of the parameters that must be agreed upon by sending parties and receiving parties before transmission can take place.

The following code example displays the possible values of the Parity enumeration to the console, then prompts the user to choose one. This code example is part of a larger code example provided for the SerialPort class.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

.NET Compact Framework

Supported in: 2.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.