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

In .NET how can you solve the DLL Hell problem?

1210


Why do we need private constructor in c#?

939


What is difference between method overriding and method overloading?

1109


Explain states of a thread in c#?

1011


Enlist all the components of an ado.net framework?

915


What is the use of properties window?

1041


What is a scope in c#?

942


Which property do we set on a Combo Box to display data on it prior to setting the DataSource ?

980


Why data types are important in c#?

978


What is an array of arrays called?

917


what is a constructor? What is a destructor?

1033


What is default access modifier for class in c#?

1092


What is string empty?

956


If a.equals(b) is true then a.gethashcode & b.gethashcode must always return same hash code.

1066


What is serialization in dot net?

1040