11. In C#, what is the purpose of the Action delegate? A. Represents a delegate that encapsulates a method that takes no parameters and does not return a value B. Represents a delegate that encapsulates a method that takes no parameters and returns a value C. Represents a delegate that encapsulates a method that has two parameters and returns a value D. Represents a delegate that can encapsulate a method with a single parameter and does not return a value Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
12. What is the benefit of using events and delegates in C#? A. Increases code complexity and tight coupling between components B. Reduces performance overhead and increases code maintainability C. Decouples the publisher from the subscriber, allowing for loosely coupled applications D. Increases tight coupling between components and makes code less reusable Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
13. In C#, which keyword is used to raise an event? A. this B. base C. event D. raise Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
14. What is the purpose of the Func delegate in C#? A. Represents a delegate that encapsulates a method that takes no parameters and returns a value B. Represents a delegate that can encapsulate a method with one parameter and returns a value C. Represents a delegate that encapsulates a method that takes no parameters and does not return a value D. None of the above Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board
15. In C#, which keyword is used to declare an event that can be raised by any class within the same assembly, but not outside it? A. internal B. protected internal C. private D. public Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board
16. What is the primary purpose of using delegates in C#? A. To manage memory B. To handle exceptions C. To provide a way to reference and invoke methods D. To declare classes Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
17. In C#, which keyword is used to declare an event in an interface? A. interface B. delegate C. class D. event Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
18. What is the main advantage of using events over direct method calls in C#? A. Encapsulation and decoupling B. Performance optimization C. Code readability D. Simplified syntax Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
19. Which delegate type is used to represent methods that take no parameters and return a value in C#? A. EventHandler B. Predicate C. Action D. Func Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
20. What does the += operator do when used with events in C#? A. Removes an event handler from the event B. Subscribes to the event C. Adds an event handler to the event D. Invokes the event Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board