
Delegates
Quiz
•
Education
•
University
•
Practice Problem
•
Hard
Innocent Manganyi
Used 1+ times
FREE Resource
Enhance your content in a minute
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
What is a delegate in C#?
A class that encapsulates a method signature
A pointer to a function
A type-safe function pointer
A reserved keyword for asynchronous programming
Answer explanation
A delegate in C# is a type-safe function pointer that can reference methods with a particular signature.
2.
MULTIPLE CHOICE QUESTION
30 sec • 3 pts
Which keyword is used to declare a delegate type in C#?
delegate
function
delegateType
method
Answer explanation
The keyword "delegate" is used to declare a delegate type in C#.
3.
MULTIPLE CHOICE QUESTION
30 sec • 4 pts
Delegates in C# support:
Single method call
Multicast delegates
Both a and b
None of the above
Answer explanation
Delegates in C# support single method call as well as multicast delegates (i.e., delegates that can point to multiple methods).
4.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
What is the return type of a delegate?
void
int
string
It depends on the method it points to
Answer explanation
The return type of a delegate depends on the method it points to.
5.
MULTIPLE CHOICE QUESTION
30 sec • 3 pts
Which of the following statements is true about multicast delegates?
They can point to multiple methods.
They can point to only one method.
They cannot be invoked.
They are obsolete in C#.
Answer explanation
Multicast delegates in C# can point to multiple methods.
6.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Which delegate type is provided by C# for asynchronous programming?
AsyncCallback
AsyncDelegate
AsyncFunction
None of the above
Answer explanation
AsyncCallback delegate type is provided by C# for asynchronous programming.
7.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which keyword is used to combine two delegates into a single multicast delegate?
join
merge
+
+=
Answer explanation
The += operator is used to combine two delegates into a single multicast delegate.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
20 questions
REVISION 3 : TOPIC 3, 4, 5 & 7
Quiz
•
1st Grade - University
15 questions
Foundations of Education Quiz
Quiz
•
University
15 questions
Basics of Control Systems
Quiz
•
University
20 questions
EDUCATION MCQ
Quiz
•
University
15 questions
Assessment of Learning
Quiz
•
University
15 questions
Human Resource Management
Quiz
•
University
16 questions
Budgeting
Quiz
•
9th Grade - University
20 questions
Transportation Engineering
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
