What is delegate in C#

A delegate is a class that can hold a reference to a method.it can hold references only to methods that match its signature.A delegate is a callback. Delegates allow for flexibility and fine-grain control in event handling. A delegate acts as an event dispatcher for the class that raises the event by maintaining a list of registered event handlers for the event. By convention,event delegates in the .NET Framework have two parameters, the source that raised the event and the data for the event.

Leave a comment