SerialPort Methods

SerialPort Methods

 

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

NameDescription
System_CAPS_pubmethodClose()

Closes the port connection, sets the IsOpen property to false, and disposes of the internal Stream object.

System_CAPS_pubmethodCreateObjRef(Type)

Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodDiscardInBuffer()

Discards data from the serial driver's receive buffer.

System_CAPS_pubmethodDiscardOutBuffer()

Discards data from the serial driver's transmit buffer.

System_CAPS_pubmethodDispose()

Releases all resources used by the Component.(Inherited from Component.)

System_CAPS_protmethodDispose(Boolean)

Releases the unmanaged resources used by the SerialPort and optionally releases the managed resources.(Overrides Component.Dispose(Boolean).)

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection.(Inherited from Component.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetLifetimeService()

Retrieves the current lifetime service object that controls the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodSystem_CAPS_staticGetPortNames()

Gets an array of serial port names for the current computer.

System_CAPS_protmethodGetService(Type)

Returns an object that represents a service provided by the Component or by its Container.(Inherited from Component.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodInitializeLifetimeService()

Obtains a lifetime service object to control the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone(Boolean)

Creates a shallow copy of the current MarshalByRefObject object.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodOpen()

Opens a new serial port connection.

System_CAPS_pubmethodRead(Byte[], Int32, Int32)

Reads a number of bytes from the SerialPort input buffer and writes those bytes into a byte array at the specified offset.

System_CAPS_pubmethodRead(Char[], Int32, Int32)

Reads a number of characters from the SerialPort input buffer and writes them into an array of characters at a given offset.

System_CAPS_pubmethodReadByte()

Synchronously reads one byte from the SerialPort input buffer.

System_CAPS_pubmethodReadChar()

Synchronously reads one character from the SerialPort input buffer.

System_CAPS_pubmethodReadExisting()

Reads all immediately available bytes, based on the encoding, in both the stream and the input buffer of the SerialPort object.

System_CAPS_pubmethodReadLine()

Reads up to the NewLine value in the input buffer.

System_CAPS_pubmethodReadTo(String)

Reads a string up to the specified value in the input buffer.

System_CAPS_pubmethodToString()

Returns a String containing the name of the Component, if any. This method should not be overridden.(Inherited from Component.)

System_CAPS_pubmethodWrite(Byte[], Int32, Int32)

Writes a specified number of bytes to the serial port using data from a buffer.

System_CAPS_pubmethodWrite(Char[], Int32, Int32)

Writes a specified number of characters to the serial port using data from a buffer.

System_CAPS_pubmethodWrite(String)

Writes the specified string to the serial port.

System_CAPS_pubmethodWriteLine(String)

Writes the specified string and the NewLine value to the output buffer.

Return to top
Show:
© 2016 Microsoft