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
What does ss stand for sexually?
How to disable stored procedure sql server?
What are the limitations in ssrs on sql server express edition?
What types of replication are supported in sql server?
Why olap is used?
Can we add a cpu to sql server?
What is the most common trace flags used with sql server?
What are the steps you will take to improve the performance of a poor performing query?
How to find the source of a table in sql server?
what are the critical issues you have resloved in your company
What is sub-query in sql server?
What is exclusive locks?
Do you know what is bit data type and whats the information that can be stored inside a bit column?
How would you choose between a clustered and a non-clustered index?
What command do we use to rename a db, a table and a column?