what is a delegate? what it is used for?

Answer Posted / ganesh

Delegates are a type that references method. Normally when
we calling a method we will pass some data to that method
as input parameter. But in some scenario we might need to
pass method as input parameter to other method in such case
we can use delegate.
Delegate wraps any method which matches its signature,
calling a delegate result in calling a method so this gives
the ability to call the method programmatically based on
our business needs.
hgfhfghbgf

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is the syntax written to inherit from a class in C#?Give an example ?

543


Can delegates be used as callbacks?

496


Explain About CLS?

547


What is the difference between array and arraylist c#?

468


What is the difference between a function and a method?

509






What are the properties of a string class?

515


What are methods c#?

486


What is join in c#?

484


What does int parse do in c#?

471


What is the difference between Java and .NET garbage collectors?

513


What is .net c#?

481


How do you sort a list in c#?

496


Why delegate is used in c#?

473


Can I do things in il that I can't do in c#?

527


How do you declare an arraylist?

498