What are event receivers?When would you use an event receiver?
In SharePoint, event receivers are specific classes that inherit from the SpItemEventReceiver or SPListEventReciever base class, both of which derive out of the abstract base class SPEventReceiverSTatus and provide an efficient option of responding to multiple events as they occur within SharePoint, like adding an item or deleting an item.
An event receiver by its name suggests that it receives events. You could use a receiver for something very simple like canceling an action or deleting a document library using the Cancel property. This would further prevent users from unnecessarily deleting any documents if you wanted to maintain data storage retention.
BY Best Interview Question ON 18 Feb 2020