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 is log shipping? Can we do logshipping with SQL Server 7.0 ?
If you lose rights to your sql server instance what are the options to connect to sql server instance? : sql server security
Can we use trigger new in before insert?
What do you understand by triggers and mention the different types of it?
What is for xml in sql server?
What are the difference between primary keys and foreign keys?
Does a sql server 2005 select statement require a from?
What is an identity?
wat wil hapn if we give the both read and deny read permission to user?
What should be the fill factor for indexes created on tables? : sql server database administration
Explain “@@rowcount” and “@@error” in sql server?
What do you understand by a stored procedure?
What is open database communication (odbc)?
What are cascading parameters in ssrs reports?
What do you mean by acid?