An Example:
class SpecialButton
{
public SpecialButton(ButtonConfig conf, Method definedMethod)
{
button = new Button();
button.Location = conf.Location;
//etc.
button.Click += new System.EventHandler(definedMethod);
}
}
is it possible to define a variable as method? I want to use the delegate for this click event, which comes from outside of this class.
Thank You.
I would use either
Action<Object, EventArgs>or justEventHandler.