According to Microsoft event naming guidelines, the sender parameter in a C# event handler \"is always of type object, even if it is possible to use a
I use the following delegate when I would prefer a strongly-typed sender.
///
/// Delegate used to handle events with a strongly-typed sender.
///
/// The type of the sender.
/// The type of the event arguments.
/// The control where the event originated.
/// Any event arguments.
public delegate void EventHandler(TSender sender, TArgs e) where TArgs : EventArgs;
This can be used in the following manner:
public event EventHandler CustomEvent;