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 sqlconnection in c#?
Can you create an instance of a static class?
What is querystring in c#?
What is the main method?
What is attribute c#?
What is session and cookies in c#?
What are custom attributes in c#?
What is an escape sequence?
What are sessions in c#?
What is private protected in c#?
What is an icollection in c#?
What are the 3 logical operators?
What is namespace in oop?
What are value types and reference types?
What is the syntax for calling an overloaded constructor within a constructor?