There are two descriptions of the delegate: first, in a third-party assembly:
public delegate void ClickMenuItem (object sender, EventArgs e)
s
Fortunately, it's simple. You can just write:
ClickMenuItem clickMenuItem = ...; // Wherever you get this from
EventHandler handler = new EventHandler(clickMenuItem);
And in reverse:
EventHandler handler = ...;
ClickMenuItem clickMenuItem = new ClickMenuItem(handler);
This will even work in C# 1.0. Note that if you then change the value of the original variable, that change won't be reflected in the "converted" one. For example:
ClickMenuItem click = new ClickMenuItem(SomeMethod);
EventHandler handler = new EventHandler(click);
click = null;
handler(this, EventArgs.Empty); // This will still call SomeMethod