T
Tee
Hi,
As topic,
Can we add an event handler that has different delegate?
Example:
I have a method that takes no parameter:
public void xyz()
I would like button1 to fire that method onclick.
button1.Click += new EventHandler(xyz)
I understand that button click event should has parameter like this :
(object sender, System.EventArgs e)
But what if I want to "force" it add the method? Or at least maybe make a
convert on runtime, like convert xyz() to xyz(object sender,
System.EventArgs e), and pass in (null, null).
Can I achieve that?
Thanks,
Tee
As topic,
Can we add an event handler that has different delegate?
Example:
I have a method that takes no parameter:
public void xyz()
I would like button1 to fire that method onclick.
button1.Click += new EventHandler(xyz)
I understand that button click event should has parameter like this :
(object sender, System.EventArgs e)
But what if I want to "force" it add the method? Or at least maybe make a
convert on runtime, like convert xyz() to xyz(object sender,
System.EventArgs e), and pass in (null, null).
Can I achieve that?
Thanks,
Tee