H1. Delegates and Events

5.0(1)
Studied by 7 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/27

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 8:11 AM on 9/7/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

28 Terms

1
New cards

Delegate

What is a class in .NET that encapsulates a method?

2
New cards

Delegate

What is a reference type data type that holds a reference method?

3
New cards

Delegate

What is the class that can call any method as long as its signature matches?

4
New cards

delegate keyword

What keyword is used in declaring a delegate on a class?

5
New cards
<access modifier> delegate <return type> <delegate-name> (<parameters>);


What is the syntax of Delegate?

6
New cards

new keyword

What keyword is needed in order to instantiate the delegate?

7
New cards

new keyword

Which is associated with the method and supposed to refer on the object?

8
New cards

Generic Delegates

What delegates are not bound to any specific type?

9
New cards

Generic Delegates

What can reference a method that returns and takes parameters of different types?

10
New cards
<access-modifier> <delegate keyword> <X return type> <delegate-varname>(X keyword, args);


What is the syntax of Generic Delegate?

11
New cards

[delegates] and [interfaces]

Even if both […] and […] include the declaration, they still have differences.

12
New cards

Delegates

Which refers to having no implementation, they are safe callbacks and only have a declaration?

13
New cards

Delegates

Which can reference any method of a class that provides arguments and return types?

14
New cards

Delegates

Which are used if a class needs more than one implementation of the method?

15
New cards

Delegates

Which are faster to execute but slower to get?

16
New cards

Interfaces

A class that implements […] can implement all the methods associated with it.

17
New cards

Interfaces

Which are used to allow extending some of the objects’ functionality?

18
New cards

Interfaces

Which can implement a method only once?

19
New cards

Interfaces

Which are slower in executing but faster to get?

20
New cards

Events

In C#.NET, what are the usual task initiators?

21
New cards

Event

What is a member of a class that is fired whenever a specific action takes place?

22
New cards

Event Handlers

What do you call the methods that are invoked when an event occurs?

23
New cards

Delegate

What should be declared first before the event declaration?

24
New cards
<access_modifier> <event_keyword> <delegate_name> <event_name>;


What is the syntax of Event Declaration?

25
New cards

event_name += delegate_instance;

What is the syntax for adding an event?

26
New cards

add and remove

Which accessors are similar to get and set accessors?

27
New cards

add accessor

Which is used to register a new subscription to an event?

28
New cards

remove accessor

Which is used to unregister a subscription to an event?