0

as per definition, the concept of multicast delegates explains that it holds reference to more than 1 function. But where is multicast delegates used in daily practice or any real-world example of it .

thanks

manu
  • 85
  • 7

1 Answers1

1

One scenario may be the following:

Assume I have the following method:

Execute(MyMultiCastDelegate deleg){
//Do some tasks
deleg();
}

Let's also assume that I want to execute three functions when Execute finishes. So we declare an instance of MyMultiCastDelegate and we attach the three functions to it.

If Delegates were not multicast, we would have to declare a function that combines the three functions, then pass it to the Execute function.

mrida
  • 1,157
  • 1
  • 10
  • 16