The word event and delegates always come together, but they are separate to each other. It is true that delegates are independent objects which each event needs to perform its callback.
Delegates can be regarded as function prototypes, which prototype one method so that an object of it can point to that function. In other words, delegates are types which maps a method signature, so that a variable of a delegate can refer a method of same signature.
delegate int MySampleDelegate(int x, int y);
public void add(int x, int y)
return x + y;
public void substract(int x, int y)
return x - y;
From the main function you can call a delegate using :
MySampleDelegate obj1 = new MySampleDelegate(add);
MySampleDelegate obj2 = new MySampleDelegate(substract);
Console.Write(obj1(10, 20)); // Prints 30
Console.Write(obj2(40, 10)); //Prints 30
So the first object points to add method, while the second object to substract. You can call a delegate similar to how you call a method.
Events are callbacks from a class which invokes the associated delegate directly when the event is executed. In case of event driven approach, there is a subscriber of an event. Event is subscribed from outside using an eventhandler, which is a method declared externally and can be called back whenever the class wants to invoke.
Thus you can say Events are generated from class itself which calls a delegate
. The delegate if subscribed from outside will call the actual method.