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...

What is a delegate?

Answer Posted / venkat2050

delegate is a wrapper we can call any method at runtime to
call delegate by calling the keyword del
using system;
namespace sample prog
{
public delegate double(doublex,doubley);
class math
{
public double add(doublex,doubley);
{
returnx+y;
}
}
class sample
{
svm()
{
sample prog.Mathm=new sampleprog.math();
deld=new del(m.add);
c.w(d(48.97,27.29));
d=new del(m.sub);
c.w(d(29.29,7.92));
c.r
}
}

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is ienumerable used?

894


What is icomparable in c#?

962


What is inumerable?

1048


What is c sharp used for?

902


What is xaml in c#?

935


Difference between Value type & reference types ? and give the example in .Net?

941


Explain states of a thread in c#?

971


What is the major difference between a custom control and user control?

1055


Is clr a compiler?

870


Explain about CTS?

962


How do I unload an assembly?

948


Why would you use untrusted verification?

931


What is immutable in C#?

1012


What is satellite assembly? And steps to create satellite assembly?

1006


Can we have only “try” block without “catch” block in c#?

874