There are two descriptions of the delegate: first, in a third-party assembly:
public delegate void ClickMenuItem (object sender, EventArgs e)
s
In addition to other answers, if you want to do convert between compatible delegate types without knowing the type at compile time, you can do something like that:
static Delegate ConvertDelegate(Delegate sourceDelegate, Type targetType)
{
return Delegate.CreateDelegate(
targetType,
sourceDelegate.Target,
sourceDelegate.Method);
}
It can be useful if you need to subscribe to an event dynamically.