What is the main purpose of delegates in c#?



What is the main purpose of delegates in c#?..

Answer / Shailesh Krishna Verma

"Delegates in C# serve multiple purposes: they allow for encapsulation, method pointers, event handling, and callbacks. Delegates also enable decoupling of classes by allowing one class to define a method signature, and another to provide the implementation at runtime. Delegates can be used for asynchronous programming to manage multiple tasks concurrently."n

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

How does the lifecycle of Windows services differ from Standard EXE?

1 Answers   Siebel Systems,


is it possible to inherit a class but methods declared in the class should not be inheritable i possible how?

8 Answers   Microsoft,


Why do I get a syntax error when trying to declare a variable called checked?

1 Answers  


Why are there five tracing levels in System.Diagnostics.TraceSwitcher?

1 Answers  


What is void method?

1 Answers  


How does dll hell solve in .net?

1 Answers  


What is the difference between “finalize” and “finally” methods in c#?

1 Answers  


How do you encapsulate in c#?

1 Answers  


Explain metadata in c#.

1 Answers  


hi i m bhawna ,a student of mca want to know about what type of technical question has been asked in an interview of mnc's like HCL,TCS,WIPRO

1 Answers   HCL,


What are the 3 different types of arrays?

1 Answers  


What are c# types?

1 Answers  


Categories