ZylSerialPort.NET

SerialPort.OnReceived Method 

Raises the Received event.

[Visual Basic]
Overridable Protected Sub OnReceived( _
   ByVal DataEventArgs As DataEventArgs _
)
[C#]
protected virtual void OnReceived(
   DataEventArgs e
);

Parameters

DataEventArgs
A DataEventArgs that contains the event data.

Remarks

Raising an event invokes the event handler through a delegate. The OnReceived method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. Notes to Inheritors: When overriding OnReceived in a derived class, be sure to call the base class's OnReceived method so that registered delegates receive the event.

See Also

SerialPort Class | ZylSerialPort Namespace