I am developing a Win Forms application using a MVP pattern. I would like to pass the button clicked tag value to the presenter. Because I want to get the button.tag property I need to sender argument to be of type button. How can I do this with out doing this:
private void button0_Click(object sender, EventArgs e) { if (sender is Button) { presenter.CheckLeadingZero(sender as Button); } }
I am having to downcast the object to a button in the method parameter.
Thanks!