Share via


ErrorReceived Event

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

Represents the method that handles the error event of a SerialPort object.

Namespace:  System.IO.Ports
Assembly:  Microsoft.SPOT.Hardware.SerialPort (in Microsoft.SPOT.Hardware.SerialPort.dll)

Syntax

'Declaration
Public Event ErrorReceived As SerialErrorReceivedEventHandler
public event SerialErrorReceivedEventHandler ErrorReceived
public:
 event SerialErrorReceivedEventHandler^ ErrorReceived {
    void add (SerialErrorReceivedEventHandler^ value);
    void remove (SerialErrorReceivedEventHandler^ value);
}
member ErrorReceived : IEvent<SerialErrorReceivedEventHandler,
    SerialErrorReceivedEventArgs>
JScript does not support events.

Remarks

Error events can be caused by any of the items in the SerialError enumeration. Because the operating system determines whether to raise this event or not, not all parity errors may be reported.

DataReceived and ErrorReceived events may be called out of order, and there may be a slight delay between when the underlying stream reports the error and when code can when the event handler is executed. Only one event handler can execute at a time.

If a parity error occurs on the trailing byte of a stream, an extra byte will be added to the input buffer with a value of 126.

.NET Framework Security

See Also

Reference

SerialPort Class

System.IO.Ports Namespace