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

what is the meaning of Object lifetime in OOPS

957


Can you access a hidden base class method in the derived class?

904


Can you have an array of arrays?

943


Can datetime be null c#?

864


What is difference between property and variable in c#?

860


What are the uses of namespaces?

1001


What is sorting in c#?

986


What is anonymous methods in c#?

1093


What is array and its types in c#?

916


What is the adv of using System.Text.StringBuilder over System.String?

954


How can you force derived classes to provide new method implementations for virtual methods?

895


Does c# support properties of array types?

919


How do you inherit a class into other class in c#?

909


What is generic types in c#?

920


Explain the process of inheriting a class into another class?

977