What are delegates in .Net and why do we need them?
There are few good books which cover everything about delegate and how they work but one thing which was missing in all of them was why do we need delegates and how the concept of delegates has originated. In this article I will try to cover this. For the internal working of delegates you can refer to these books: CLR via C# by Jeffery Richter C# in Depth by Jon Skeet The programming world consists of states and operations. State is the state of an object. An object consists of member fields which holds the state of the object. For example an object of class Employee will have members as Name, DateOfBirth, Project, Department etc. These members together hold the state of an employee object. An action is an operation which when done on an object moves it from one state to another. For example ChangeProject operation on an employee assigns a new project to the employee thus moving the state of the employee object from one to another. In programming languages these operatio...