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
Do we get an error while executing the “finally” block in c#?
Is var a data type?
How to use the sreamReader class to read form a text file?
What is difference between interface and abstraction?
What is stringreader in c#?
Why do we need collections in c#?
Why do we use class in c#?
What are some examples of desktop applications?
Can abstract class have private constructor c#?
What happens when thread sleep () method is called?
What is lazy t?
What does void mean unity?
Can dictionary have duplicate keys c#?
What is option parameter in C#?
What is difference between throw and throws in c#?