1.

what is multicast delegate

Answer»

The C# LANGUAGE support feature that is known as the multicast delegate. Any delegate that has a void return type is called multicast delegate. A multicast delegate can be assigned and invoke multiple methods.
if we are doing ASP.NET development and have ever looked at a page's InitializeComponent() METHOD, we may have NOTICED a STATEMENT like this:

this.EditButton.Click += new System.EventHandler(this.EditButton_Click);
If we want to add another EVENT handler then we can easily do that for example:-
this.EditButton.Click += new System.EventHandler(this.EditButton_Click);
this.SearchButton.Click += new System.EventHandler(this.newmethod);
In above example first Editbutton_Click is called after that newMethod is called



Discussion

No Comment Found