Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What does ss stand for sexually?

1143


How to disable stored procedure sql server?

1668


What are the limitations in ssrs on sql server express edition?

195


What types of replication are supported in sql server?

1116


Why olap is used?

1034


Can we add a cpu to sql server?

1063


What is the most common trace flags used with sql server?

1118


What are the steps you will take to improve the performance of a poor performing query?

1019


How to find the source of a table in sql server?

1037


what are the critical issues you have resloved in your company

2016


What is sub-query in sql server?

1261


What is exclusive locks?

1012


Do you know what is bit data type and whats the information that can be stored inside a bit column?

999


How would you choose between a clustered and a non-clustered index?

1019


What command do we use to rename a db, a table and a column?

980