C# Programming - Delegates

Exercise : Delegates - General Questions
  • Delegates - General Questions
11.
Suppose on pushing a button an object is to be notified, but it is not known until runtime which object should be notified. Which of the following programming constructs should be used to implement this idea?
Attribute
Delegate
Namespace
Interface
Encapsulation
Answer: Option
Explanation:
No answer description is available. Let's discuss.

12.
Which of the following statements is incorrect about a delegate?
A single delegate can invoke more than one method.
Delegates can be shared.
Delegate is a value type.
Delegates are type-safe wrappers for function pointers.
The signature of a delegate must match the signature of the method that is to be called using it.
Answer: Option
Explanation:
No answer description is available. Let's discuss.

13.
Suppose a Generic class called SortObjects is to be made capable of sorting objects of any type (Integer, Single, Byte etc.). Which of the following programming constructs should be used to implement the comparision function?
Namespace
Interface
Encapsulation
Delegate
Attribute
Answer: Option
Explanation:
No answer description is available. Let's discuss.

14.
With which of the following can the ref keyword be used?
  1. Static data
  2. Instance data
  3. Static function/subroutine
  4. Instance function/subroutine
1, 2
3, 4
1, 3
2, 4
All of the above
Answer: Option
Explanation:
No answer description is available. Let's discuss.