C# Programming - Delegates - Discussion

Discussion :: Delegates - General Questions (Q.No.1)


Which of the following statements is incorrect about delegate?

[A]. Delegates are reference types.
[B]. Delegates are object oriented.
[C]. Delegates are type-safe.
[D]. Delegates serve the same purpose as function pointers in C and pointers to member function operators in C++.
[E]. Only one method can be called using a delegate.

Answer: Option E


No answer description available for this question.

Animesh Kumar said: (Jul 30, 2011)  
Multiple methods can be called using a multi-cast delegate..
using += operator.

Bindu said: (Sep 30, 2011)  
It is possible for a delegate to call more than one function at a time when all the methods that point to that delegate has same method signature, and += operator is used to append method references to the delegate.

Sean Johnson said: (Nov 18, 2011)  
There are two types of delegates: Unicast and Multicast delegates.

In Unicast ,at time only one method is associated with single cast delegate.

In Multicast delegate, at a time two or more methods is associated with delegates. i.e a delegate is refrencing to two or more methods.

So the anwer is E.

Jeet said: (Jan 9, 2012)  
Yes but delegates is much more tan just a function pointer as it is in c and cpp, moreover delegates are much more heavy as compared to the function pointers in c and cpp.

Hema said: (Feb 15, 2012)  
We can call multiple methods by using delegates.

Ravindar Nath Mishra said: (Jul 30, 2012)  
We can call multiple method multicast delegate. Each delegate object are created, by default maintains an invocation list, which is the list of methods that are encapsulated into the delegate object. The invocation list of multicast delegates contains multiple methods that are invoked in the order they were added.

Sunil Kumar Singh said: (Aug 9, 2012)  
In C and C++ we use the function pointer in this a function hold the reference of another function which is similar as of the function pointer. Since C# does not support the pointer so we use the delegate here in place of function pointer.

Sreekanth Ravula said: (Aug 18, 2012)  
We are calling more than one method by using unicast delegate also but the method name should be same.

Ashwani Kumar said: (Dec 3, 2012)  
We are calling more than one method by using unicast delegate also but the method name should be same. Delegate is similar function pointer. C# does not support the pointer but delegate is use in function pointer.

Santosh Kitta said: (Feb 21, 2013)  
Delegate is an a object that can to method it is allow you to dynamically change the reference to method in a class,
Delegate is reference type variable which holds reference to method. This method can be change at run time.

Vishwadeep said: (Apr 19, 2013)  
Synchronous: simultaneously process is Main Intention of Delegates.

If a delegate has do not return any value, it is a multicast delegate that can invoke multiple methods.

Invoke all the delegates with the combined delegates DynamicInvoke property.

Delegates are invoked in the order they are added.

Kiran said: (Dec 9, 2013)  
There are two types of Delegates.

1) Single Delegate.

2) MultiCast Delegate.

It supports These type of delegates.

Pratik said: (Nov 23, 2014)  
Multicast Delegate can call more than one method.

Mahesh said: (Dec 8, 2014)  
You can call multiple methods using "+" operator with delegate. :).

Shahbaz Chaudhary said: (Jan 19, 2015)  
But correct answer is show delegate can only one method called but everybody say delegate can be called more than one method at same time. So please give me correct answer i am confuse of this query and I don't know more about delegate.

Jilajeet said: (Mar 4, 2015)  
We can call multiple method at time in delegate by using "+" operator in multicast. So I think last option is incorrect.

Serega Polyakov said: (Jun 24, 2015)  
The answer is E, because we can use multiple methods using one delegate.

Vineet Kumar said: (Jul 18, 2016)  
This option is incorrect as we have multicast delegates for the same.

Shailesh Yadav said: (Feb 5, 2017)  
Delegates is referenced type. Its allow you to change the reference to a method at run time.

Alazar said: (Jan 18, 2018)  
D can also be an answer! A delegate in C# is similar to a function pointer in C or C++.

Using a delegate allows the programmer to encapsulate a reference to a method inside a delegate object. The delegate object can then be passed to code which can call the referenced method, without having to know at compile time which method will be invoked.

Kuldip said: (May 19, 2019)  
We can also use the multi-cast delegates with one or more method.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.