Visual Basic (Declaration) | |
---|---|
Protected Overridable Sub OnData( _ ByVal e As DataEventArgs _ ) |
Visual Basic (Usage) | ![]() |
---|---|
Dim instance As TcpBase Dim e As DataEventArgs instance.OnData(e) |
C# | |
---|---|
protected virtual void OnData( DataEventArgs e ) |
Managed Extensions for C++ | |
---|---|
protected: virtual void OnData( DataEventArgs* e ) |
C++/CLI | |
---|---|
protected: virtual void OnData( DataEventArgs^ e ) |
Parameters
- e
- A DataEventArgs object that contains the event data.
Raising an event invokes the event handler through a delegate. The Synchronizing property must be set.
The OnData 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 OnData in a derived class, be sure to call the base class OnData 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.
Target Platforms: Microsoft .NET Framework 2.0