what is a delegate? what it is used for?
Answer Posted / subbu
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.
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is the use of constructor in c# with example?
Define c# i/o classes? List the commonly used classes?
Can we call server-side code (c# or vb.net code) from javascript?
What is ac callback?
What is a virtual property. Give an example?
What do you know about WM_CHAR message?
How do you pass reference parameters in c#?
What is yield return in c#?
How to Install uninstall assemblies into GAC?
Explain the difference between and xml documentation tag?
Can struct have constructor c#?
Explain the difference between abstract class and interface.
What is difference between c sharp and c#?
Is inheritance possible in c sharp?
What are the types of delegates in c#?