System.IO.Ports.SerialPort.DiscardInBuffer Method

Discards data from the serial driver's receive buffer.

Syntax

public void DiscardInBuffer ()

Remarks

This method is equivalent to the following Visual Basic code: MSComm1.InBufferCount = 0. It clears the receive buffer, but does not affect the transmit buffer.

Requirements

Namespace: System.IO.Ports
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0