|
-
May 26th, 2006, 10:00 AM
#1
Thread Starter
Fanatic Member
[2.0] Why do I need delegates for events?
Bear with me, I'm a VB6 programmer with some vb.net exp. Most of my grief is coming from the syntax.
So in every example on how to handle events in C#, the authors begin with defining a Delegate. Why? I do not, apparently need a delegate to handle the Event... or at least I don't need to explicitly declare one. I can use the EventHAndler from System.EventHandler, right?
My code for the event only consists of four main pieces,
1. Declare the Event
2. Call (or raise) the event
3. Assign the handler for the event (+=)
4. method that runs in response to event.
What am I missing?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|