- Delegates can invoke the methods that they reference without making explicit calls to those methods.
- Events are declares using delegates
- When an event occurs the control is passed to the event handler method.
- The event handling method is assigned to the event trough a delegate.
- Adding an event handing method to an event.
Syntax:
<Object.EventName> += new <DelegateName> (<funtionToCall>);
- Removing an event handling method to an event.
Syntax:
<Object.EventName> -= new <DelegateName> (<funtionToCall>);
- Event call.
Syntax:
<EventName> (<parameters>);
- When an event has no event handler assigned.
Syntax:
<EventName> is null;
- Invoking an event with no event handler will throw an exception
Events and Delegates
Subscribe to:
Post Comments
(
Atom
)
0 comments :
Post a Comment