developmentor - a developer services company				  
				      
   Modules

Delegates and Events


1. Delegates are typically used to implement what design pattern?
Singleton
Factory method
Publish/subscribe

2. What information is specified by a delegate?
The types of the objects involved in the registration and callback
The name of the callback method
The parameter list and return type of the callback method

3. How many subscribers may be registered with a delegate?
None - only an event can have registered subscribers
One
As many as needed

4. A delegate field has what initial value?
Zero
null
Empty string

5. What is the effect of adding the event keyword to a delegate field?
The delegate is automatically made public
Client code is limited to accessing the delegate using only the += and -= operators
The delegate is limited to handling only one subscriber

This material is excerpted from the Programming C# course offered by DevelopMentor.