Question discussion

In C#, a delegate is

2532Medium DSSSB TGT Computer Science 0 replies 1 views
0

In C#, a delegate is

  • Aa type-safe object that holds a reference to a method
  • Ba keyword that prevents a method from being overridden
  • Ca collection that stores key–value pairs
  • Da block of code that locks an object for one thread
Correct answer: A

Explanation

A delegate is similar to a function pointer but is type-safe; it can refer to any method with a matching signature and is the basis of events and callbacks.

Discussion 0

Nobody has replied yet. Start the discussion!