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
difference between Clustered index and non clustered index ?
What is CTE in SQL
Explain the commands in sql server?
How to create a simple table to test triggers in ms sql server?
Do you know the different ddl commands in sql?
What is for xml in sql server?
What is data set in report?
What is index, cluster index and nonclustered index?
What are examples of triggers?
What is sub-query in sql server?
How do you trace the traffic hitting a sql server?
How to implement one-to-one, one-to-many and many-to-many relationships while designing tables?
How to loop through returning rows?
Tell me the use of keyword with encryption. Create a store procedure with encryption?
What is abstracting periodical?