SerialPort Methods

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

The SerialPort type exposes the following members.

  Name Description
Public method Close Closes the port connection, sets the IsOpen property to false, and disposes of the internal Stream object. (Overrides Stream..::..Close()()()().)
Public method DiscardInBuffer Discards data from the serial driver's receive buffer.
Public method DiscardOutBuffer Discards data from the serial driver's transmit buffer.
Public method Dispose()()()() Releases all resources used by the Stream. (Inherited from Stream.)
Protected method Dispose(Boolean) Releases the unmanaged resources used by the SerialPort and optionally releases the managed resources. (Overrides Stream..::..Dispose(Boolean).)
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Cleans up resources. (Inherited from Stream.)
Public method Flush Sends any data waiting in the send buffer of this SerialPort and clears the buffer. (Overrides Stream..::..Flush()()()().)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Open Opens a new serial port connection.
Public method Read Reads a number of bytes from the SerialPort input buffer and writes those bytes into a byte array at the specified offset. (Overrides Stream..::..Read(array<Byte>[]()[][], Int32, Int32).)
Public method ReadByte Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream. (Inherited from Stream.)
Public method Seek Sets the position within the current stream. (Overrides Stream..::..Seek(Int64, SeekOrigin).)
Public method SetLength Sets the length of the current stream. (Overrides Stream..::..SetLength(Int64).)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method Write Writes a specified number of bytes to the serial port using data from a buffer. (Overrides Stream..::..Write(array<Byte>[]()[][], Int32, Int32).)
Public method WriteByte Writes a byte to the current position in the stream and advances the position within the stream by one byte. (Inherited from Stream.)