June 2003
Intermediate to advanced
800 pages
34h 20m
English
You need to send data with a custom event.
Derive a custom event argument object from the System.EventArgs class, add the information you need, and declare the event. Use RaiseEvent to fire the event.
.NET events follow a common syntax. The first argument is the sender of the event (as a weakly typed System.Object instance). The second argument is an object derived from System.EventArgs that contains any additional information. The custom EventArgs class should always be named in the form EventNameEventArgs.
Here’s an event declaration that follows these conventions and can be added to the declaration of any class:
Public Event TaskCompleted(sender As Object, e As TaskCompletedEventArgs)
The custom EventArgs ...
Read now
Unlock full access