Export (0) Print
Expand All

SerialPort Members

Represents a serial port resource.

The SerialPort type exposes the following members.

  NameDescription
Public method Supported by the .NET Compact Framework SerialPort Overloaded. Initializes a new instance of the SerialPort class.
Top

  NameDescription
Public method Supported by the .NET Compact Framework Close Closes the port connection, sets the IsOpen property to false, and disposes of the internal Stream object.
Public method CreateObjRef Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Public method Supported by the .NET Compact Framework DiscardInBuffer Discards data from the serial driver's receive buffer.
Public method Supported by the .NET Compact Framework DiscardOutBuffer Discards data from the serial driver's transmit buffer.
Public method Supported by the .NET Compact Framework Dispose Overloaded. Releases the unmanaged resources used by the SerialPort object.
Public method Supported by the .NET Compact Framework Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Supported by the .NET Compact Framework Finalize Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component.)
Public method Supported by the .NET Compact Framework GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetLifetimeService Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public method Static member Supported by the .NET Compact Framework GetPortNames Gets an array of serial port names for the current computer.
Protected method GetService Returns an object that represents a service provided by the Component or by its Container. (Inherited from Component.)
Public method Supported by the .NET Compact Framework GetType Gets the type of the current instance. (Inherited from Object.)
Public method InitializeLifetimeService Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected method Supported by the .NET Compact Framework MemberwiseClone Overloaded.
Public method Supported by the .NET Compact Framework Open Opens a new serial port connection.
Public method Supported by the .NET Compact Framework Read Overloaded. Reads from the SerialPort input buffer.
Public method Supported by the .NET Compact Framework ReadByte Synchronously reads one byte from the SerialPort input buffer.
Public method Supported by the .NET Compact Framework ReadChar Synchronously reads one character from the SerialPort input buffer.
Public method Supported by the .NET Compact Framework ReadExisting Reads all immediately available bytes, based on the encoding, in both the stream and the input buffer of the SerialPort object.
Public method Supported by the .NET Compact Framework ReadLine Reads up to the NewLine value in the input buffer.
Public method Supported by the .NET Compact Framework ReadTo Reads a string up to the specified value in the input buffer.
Public method Supported by the .NET Compact Framework ToString Returns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component.)

In .NET Compact Framework 3.5, this member is inherited from Object.ToString().
Public method Supported by the .NET Compact Framework Write Overloaded. Writes data to the serial port output buffer.
Public method Supported by the .NET Compact Framework WriteLine Writes the specified string and the NewLine value to the output buffer.
Top

  NameDescription
Public field Static member Supported by the .NET Compact Framework InfiniteTimeout Indicates that no time-out should occur.
Top

  NameDescription
Public property Supported by the .NET Compact Framework BaseStream Gets the underlying Stream object for a SerialPort object.
Public property Supported by the .NET Compact Framework BaudRate Gets or sets the serial baud rate.
Public property Supported by the .NET Compact Framework BreakState Gets or sets the break signal state.
Public property Supported by the .NET Compact Framework BytesToRead Gets the number of bytes of data in the receive buffer.
Public property Supported by the .NET Compact Framework BytesToWrite Gets the number of bytes of data in the send buffer.
Protected property CanRaiseEvents Gets a value indicating whether the component can raise an event. (Inherited from Component.)
Public property Supported by the .NET Compact Framework CDHolding Gets the state of the Carrier Detect line for the port.
Public property Container Gets the IContainer that contains the Component. (Inherited from Component.)
Public property Supported by the .NET Compact Framework CtsHolding Gets the state of the Clear-to-Send line.
Public property Supported by the .NET Compact Framework DataBits Gets or sets the standard length of data bits per byte.
Protected property DesignMode Gets a value that indicates whether the Component is currently in design mode. (Inherited from Component.)
Public property Supported by the .NET Compact Framework DiscardNull Gets or sets a value indicating whether null bytes are ignored when transmitted between the port and the receive buffer.
Public property Supported by the .NET Compact Framework DsrHolding Gets the state of the Data Set Ready (DSR) signal.
Public property Supported by the .NET Compact Framework DtrEnable Gets or sets a value that enables the Data Terminal Ready (DTR) signal during serial communication.
Public property Supported by the .NET Compact Framework Encoding Gets or sets the byte encoding for pre- and post-transmission conversion of text.
Protected property Supported by the .NET Compact Framework Events Gets the list of event handlers that are attached to this Component. (Inherited from Component.)
Public property Supported by the .NET Compact Framework Handshake Gets or sets the handshaking protocol for serial port transmission of data.
Public property Supported by the .NET Compact Framework IsOpen Gets a value indicating the open or closed status of the SerialPort object.
Public property Supported by the .NET Compact Framework NewLine Gets or sets the value used to interpret the end of a call to the ReadLine and WriteLine methods.
Public property Supported by the .NET Compact Framework Parity Gets or sets the parity-checking protocol.
Public property Supported by the .NET Compact Framework ParityReplace Gets or sets the byte that replaces invalid bytes in a data stream when a parity error occurs.
Public property Supported by the .NET Compact Framework PortName Gets or sets the port for communications, including but not limited to all available COM ports.
Public property Supported by the .NET Compact Framework ReadBufferSize Gets or sets the size of the SerialPort input buffer.
Public property Supported by the .NET Compact Framework ReadTimeout Gets or sets the number of milliseconds before a time-out occurs when a read operation does not finish.
Public property Supported by the .NET Compact Framework ReceivedBytesThreshold Gets or sets the number of bytes in the internal input buffer before a DataReceived event occurs.
Public property Supported by the .NET Compact Framework RtsEnable Gets or sets a value indicating whether the Request to Send (RTS) signal is enabled during serial communication.
Public property Supported by the .NET Compact Framework Site Gets or sets the ISite of the Component. (Inherited from Component.)
Public property Supported by the .NET Compact Framework StopBits Gets or sets the standard number of stopbits per byte.
Public property Supported by the .NET Compact Framework WriteBufferSize Gets or sets the size of the serial port output buffer.
Public property Supported by the .NET Compact Framework WriteTimeout Gets or sets the number of milliseconds before a time-out occurs when a write operation does not finish.
Top

  NameDescription
Public event Supported by the .NET Compact Framework DataReceived Represents the method that will handle the data received event of a SerialPort object.
Public event Supported by the .NET Compact Framework Disposed Occurs when the component is disposed by a call to the Dispose method. (Inherited from Component.)
Public event Supported by the .NET Compact Framework ErrorReceived Represents the method that handles the error event of a SerialPort object.
Public event Supported by the .NET Compact Framework PinChanged Represents the method that will handle the serial pin changed event of a SerialPort object.
Top

Community Additions

ADD
Show:
© 2014 Microsoft