MULTICAST DELEGATES IN C#.NET WITH REAL TIME EXAMPLE
Answer Posted / lince thomas
delegate void myDelegate(string s);//this is a delagate
//two functions below.
private void SayHello(string h)
{
MessageBox.Show("Hello" + h);
}
private void SayHai(string h)
{
MessageBox.Show("Hai" + h);
}
private void button1_Click(object sender, EventArgs e)
{
Delegate del;
myDelegate objDel = new myDelegate(SayHello);
myDelegate objDel1 = new myDelegate(SayHai);
del = MulticastDelegate.Combine(objDel, objDel1);
del.DynamicInvoke("Peter");
}
| Is This Answer Correct ? | 17 Yes | 1 No |
Post New Answer View All Answers
How the authentication mode can be changed?
What is a collation in ms sql server?
Why should you use or avoid select * statements?
How to list all user names in a database?
What is the difference between update lock and exclusive lock?
What are cascading parameters in ssrs reports?
How to encrypt data between dialogs?
How to update muliple row in single query?
How to handle error or exception in sql?
what is the difference between writing data to mirrored drives versus raid5 drives. : Sql server administration
Tell me what is the stuff and how does it differ from the replace function?
How to enter date and time literals in ms sql server?
What is the difference between functions and stored procedures?
what are different types of raid configurations? : Sql server database administration
What authentication modes does sql server support?