I think this proves my point, sorry for the VB Code.
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles Button1.Click
'set up the com port for a test
SerialPort1.PortName = "COM5" 'attached to breakout box with loopback
SerialPort1.BaudRate = 115200 'some speed
SerialPort1.Encoding = System.Text.Encoding.GetEncoding("windows-1252")
Dim b() As Byte = New Byte() {42, 16, 20, 254, 255, 128} 'test data
ctrcv = 0 'counter
SerialPort1.Open() 'open the port
Debug.WriteLine(DateTime.Now.ToString("HH:mm:ss.ffff")) 'show time
SerialPort1.Write(b, 0, b.Length) 'write the test data
'give the DataReceived event handler chances to fire
Threading.Thread.Sleep(30000)
'show the last time it fired and how many times
Debug.WriteLine(lastRCV.ToString("HH:mm:ss.ffff") & " " & ctrcv)
'show how many are available to read
Debug.WriteLine(DateTime.Now.ToString("HH:mm:ss.ffff") & " " & SerialPort1.BytesToRead)
Array.Clear(b, 0, b.Length)
SerialPort1.Read(b, 0, SerialPort1.BytesToRead) 'read them
SerialPort1.Close() 'close the port
Stop
End Sub
Dim ctrcv As Integer = 0, lastRCV As DateTime
Private Sub SerialPort1_DataReceived(ByVal sender As System.Object, _
ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) _
Handles SerialPort1.DataReceived
ctrcv += 1
lastRCV = DateTime.Now
End Sub
Debug output
09:34:11.3241 <- when the test started
09:34:11.3642 3 <- the last data received event!, and how many events
09:34:41.3718 6 <- when the test ended