
What is Multicast Delegate? - Explanation with an example in C# (C Sharp)?Delegates
are used to wrap and execute methods having the same signature as that
of the delegate. They wrap method calls and prevent exposing the actual
method name to the User. For a delegate
you can define an invocation list and while calling the delegate, all
the methods in its invocation list will be executed. You can add methods
to the invocation list using += operator. You can also remove methods
from the list using -= operator. The following example demonstrates usage
of multicast delegate in C# by creating a delegate and executing two different
methods using the same delegate: public delegate
void sampleDelegate(int data); Output of
this code will be: This number
is an even number
_______________________________________________________________________
FREE
Subscription
Subscribe
to our mailing list and receive new articles Note
: We never rent, trade, or sell my email lists to Visit
.NET Programming Tutorial Homepage ______________________________________________________ |