MULTICAST DELEGATES IN C#.NET WITH REAL TIME EXAMPLE

Answer Posted / guest

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is log shipping? Can we do logshipping with SQL Server 7.0 - Logshipping is a new feature of SQL Server 2000. We should have two SQL Server - Enterprise Editions. From Enterprise Manager we can configure the logshipping. In logshipping the transactional log file from one server is automatically updated into the backup database on the other server. If one server fails, the other server will have the same db and we can use this as the DR (disaster recovery) plan.

2322


How to modify an existing stored procedure in ms sql server?

545


Explain the categories of stored procedure i.e. System stored procedure, local stored procedure, temporary stored procedure, extended stored procedure, remote stored procedure?

559


How do you clear a log file?

519


What are different types of replication in sql server?

578






How can we improve performance by using SQL Server profiler?

584


How to generate create table script on an existing table in ms sql server?

654


How to insert data into an existing table?

576


What are the advantages of sql stored procedure?

546


Explain about the command-line tool SQLCMD?

571


How to recover from sql injection? : sql server security

526


What is inner join? Explain with an example?

700


Explain full-text query in sql server?

545


How except clause is differs from not in clause?

541


What are cursors stored procedures and triggers?

527