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

What is difference between arraylist and list in c#?

514


What is the difference between static and constant variables?

622


Differentiate between copy and default constructor.

669


What are extender provider components?

556


Explain about Serialize and MarshalByRef?

624






How do I make a dll in c#?

592


Why do we need interfaces in c#?

568


What is windows form in c#?

637


Give some examples for built in datatypes in c#?

636


write program in c# using this instructions name avinash varma ,work experiance<2,nochildren his work experiance is higher than 5 years,more than one children one children name is diwakar,number of years of work eperiance at current company is the ratio of children and work experiance is 0.21 to 0.5

1954


What is parallel programming in c#?

571


What is a custom attribute?

566


What are assemblies?

612


What is difference between out and ref in c#?

616


What is the difference between do and while loop?

534