.NET Framework Class Library
SerialPort Members

Represents a serial port resource.

The SerialPort type exposes the following members.

Constructors

  NameDescription
Public methodSupported by the .NET Compact FrameworkSerialPortOverloaded. Initializes a new instance of the SerialPort class.
Top
Methods

  NameDescription
Public methodSupported by the .NET Compact FrameworkCloseCloses the port connection, sets the IsOpen property to false, and disposes of the internal Stream object.
Public methodCreateObjRefCreates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Public methodSupported by the .NET Compact FrameworkDiscardInBufferDiscards data from the serial driver's receive buffer.
Public methodSupported by the .NET Compact FrameworkDiscardOutBufferDiscards data from the serial driver's transmit buffer.
Public methodSupported by the .NET Compact FrameworkDisposeOverloaded. Releases the unmanaged resources used by the SerialPort object.
Public methodSupported by the .NET Compact FrameworkEqualsDetermines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodSupported by the .NET Compact FrameworkFinalizeReleases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component.)
Public methodSupported by the .NET Compact FrameworkGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetLifetimeServiceRetrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public methodStatic memberSupported by the .NET Compact FrameworkGetPortNamesGets an array of serial port names for the current computer.
Protected methodGetServiceReturns an object that represents a service provided by the Component or by its Container. (Inherited from Component.)
Public methodSupported by the .NET Compact FrameworkGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodInitializeLifetimeServiceObtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected methodSupported by the .NET Compact FrameworkMemberwiseCloneOverloaded.
Public methodSupported by the .NET Compact FrameworkOpenOpens a new serial port connection.
Public methodSupported by the .NET Compact FrameworkReadOverloaded. Reads from the SerialPort input buffer.
Public methodSupported by the .NET Compact FrameworkReadByteSynchronously reads one byte from the SerialPort input buffer.
Public methodSupported by the .NET Compact FrameworkReadCharSynchronously reads one character from the SerialPort input buffer.
Public methodSupported by the .NET Compact FrameworkReadExistingReads all immediately available bytes, based on the encoding, in both the stream and the input buffer of the SerialPort object.
Public methodSupported by the .NET Compact FrameworkReadLineReads up to the NewLine value in the input buffer.
Public methodSupported by the .NET Compact FrameworkReadToReads a string up to the specified value in the input buffer.
Public methodSupported by the .NET Compact FrameworkToStringOverloaded.
Public methodSupported by the .NET Compact FrameworkWriteOverloaded. Writes data to the serial port output buffer.
Public methodSupported by the .NET Compact FrameworkWriteLineWrites the specified string and the NewLine value to the output buffer.
Top
Fields

  NameDescription
Public fieldStatic memberSupported by the .NET Compact FrameworkInfiniteTimeoutIndicates that no time-out should occur.
Top
Properties

  NameDescription
Public propertySupported by the .NET Compact FrameworkBaseStreamGets the underlying Stream object for a SerialPort object.
Public propertySupported by the .NET Compact FrameworkBaudRateGets or sets the serial baud rate.
Public propertySupported by the .NET Compact FrameworkBreakStateGets or sets the break signal state.
Public propertySupported by the .NET Compact FrameworkBytesToReadGets the number of bytes of data in the receive buffer.
Public propertySupported by the .NET Compact FrameworkBytesToWriteGets the number of bytes of data in the send buffer.
Protected propertyCanRaiseEventsGets a value indicating whether the component can raise an event. (Inherited from Component.)
Public propertySupported by the .NET Compact FrameworkCDHoldingGets the state of the Carrier Detect line for the port.
Public propertyContainerGets the IContainer that contains the Component. (Inherited from Component.)
Public propertySupported by the .NET Compact FrameworkCtsHoldingGets the state of the Clear-to-Send line.
Public propertySupported by the .NET Compact FrameworkDataBitsGets or sets the standard length of data bits per byte.
Protected propertyDesignModeGets a value that indicates whether the Component is currently in design mode. (Inherited from Component.)
Public propertySupported by the .NET Compact FrameworkDiscardNullGets or sets a value indicating whether null bytes are ignored when transmitted between the port and the receive buffer.
Public propertySupported by the .NET Compact FrameworkDsrHoldingGets the state of the Data Set Ready (DSR) signal.
Public propertySupported by the .NET Compact FrameworkDtrEnableGets or sets a value that enables the Data Terminal Ready (DTR) signal during serial communication.
Public propertySupported by the .NET Compact FrameworkEncodingGets or sets the byte encoding for pre- and post-transmission conversion of text.
Protected propertySupported by the .NET Compact FrameworkEventsGets the list of event handlers that are attached to this Component. (Inherited from Component.)
Public propertySupported by the .NET Compact FrameworkHandshakeGets or sets the handshaking protocol for serial port transmission of data.
Public propertySupported by the .NET Compact FrameworkIsOpenGets a value indicating the open or closed status of the SerialPort object.
Public propertySupported by the .NET Compact FrameworkNewLineGets or sets the value used to interpret the end of a call to the ReadLine and WriteLine methods.
Public propertySupported by the .NET Compact FrameworkParityGets or sets the parity-checking protocol.
Public propertySupported by the .NET Compact FrameworkParityReplaceGets or sets the byte that replaces invalid bytes in a data stream when a parity error occurs.
Public propertySupported by the .NET Compact FrameworkPortNameGets or sets the port for communications, including but not limited to all available COM ports.
Public propertySupported by the .NET Compact FrameworkReadBufferSizeGets or sets the size of the SerialPort input buffer.
Public propertySupported by the .NET Compact FrameworkReadTimeoutGets or sets the number of milliseconds before a time-out occurs when a read operation does not finish.
Public propertySupported by the .NET Compact FrameworkReceivedBytesThresholdGets or sets the number of bytes in the internal input buffer before a DataReceived event occurs.
Public propertySupported by the .NET Compact FrameworkRtsEnableGets or sets a value indicating whether the Request to Send (RTS) signal is enabled during serial communication.
Public propertySupported by the .NET Compact FrameworkSiteGets or sets the ISite of the Component. (Inherited from Component.)
Public propertySupported by the .NET Compact FrameworkStopBitsGets or sets the standard number of stopbits per byte.
Public propertySupported by the .NET Compact FrameworkWriteBufferSizeGets or sets the size of the serial port output buffer.
Public propertySupported by the .NET Compact FrameworkWriteTimeoutGets or sets the number of milliseconds before a time-out occurs when a write operation does not finish.
Top
Events

  NameDescription
Public eventSupported by the .NET Compact FrameworkDataReceivedRepresents the method that will handle the data received event of a SerialPort object.
Public eventSupported by the .NET Compact FrameworkDisposedOccurs when the component is disposed by a call to the Dispose method. (Inherited from Component.)
Public eventSupported by the .NET Compact FrameworkErrorReceivedRepresents the method that handles the error event of a SerialPort object.
Public eventSupported by the .NET Compact FrameworkPinChangedRepresents the method that will handle the serial pin changed event of a SerialPort object.
Top
See Also

Reference

Tags :


Page view tracker