PowerTCP Emulation for .NET CF
OnError Method
See Also  Send comments on this topic.
Dart.Common Namespace > ComponentBase Class : OnError Method




e
A ComponentErrorEventArgs object that contains the exception.
Raises the Error event.

Syntax

Visual Basic (Declaration) 
Protected Overridable Sub OnError( _
   ByVal e As ComponentErrorEventArgs _
) 
Visual Basic (Usage)Copy Code
Dim instance As ComponentBase
Dim e As ComponentErrorEventArgs
 
instance.OnError(e)
C# 
protected virtual void OnError( 
   ComponentErrorEventArgs e
)
Managed Extensions for C++ 
protected: virtual void OnError( 
   ComponentErrorEventArgs* e
) 
C++/CLI 
protected:
virtual void OnError( 
   ComponentErrorEventArgs^ e
) 

Parameters

e
A ComponentErrorEventArgs object that contains the exception.

Remarks

Raising an event invokes the event handler through a delegate. The Synchronizing property must be set.

The OnError 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.

Note to Inheritors: When overriding OnError in a derived class, be sure to call the base class OnError method, so that registered delegates receive the event.

See the SynchronizingObject property for important information on updating UI controls from within derived classes and events.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 4.2
© 2010 Dart Communications. All Rights Reserved.