MULTICAST DELEGATES IN C#.NET WITH REAL TIME EXAMPLE
Answers were Sorted based on User's Feedback
delegates used to invoke one function. Multicasst delegate
is used to invoke mmore than one function
Say for example
This is our delegate
delegate void myDelegate (string s);
Weh ve two functions like
publc void sayHello(String Name)
{
//implementation goes here
}
public void sayHai(String Name)
{
//implementation goes here
}
If we want to invoke both of these functions
use like
myDelegate md= new myDelegate(sayHello);
md+=new myDelegate(sayHai);
| Is This Answer Correct ? | 33 Yes | 4 No |
Answer / 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 |
What do you mean by 'normalization'?
0 Answers Ernst Young, Thomson Reuters,
Explain data warehousing in sql server?
can you any body tell me simple recovery,full recovery,bulk logged recovery where can use?
Explain the usage of floor function in sql server.
What are the source of constraints?
How to get all stored procedures in sql server?
you added a row to a view, but the row is not shown on the view. Explain how this can happen, and how you can remedy the situation
Explain triggers in sql?
How to execute multiple stored procedures at one time in sql server?
Create a dts package to produce a text file using the ‘update statistics’ command for the tables in a database with obsolete statistics.
What is the default isolation level of the sql server database?
What is temporal table?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)