Hello,
VS 2008
I have a form with 10 button. I want to have one click event for all these buttons. However, until vb when you can have the handles, C# doesn't seem to have it.
VB: Private Sub NumberButtonClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn0.Click, btn1.Click, btn2.Click, btn3.Click,
So when I click on button 0, 1, 2 etc I would like it to go into the event below.
Want is the method to do this in C#,
Many thanks,
Steve
VS 2008
I have a form with 10 button. I want to have one click event for all these buttons. However, until vb when you can have the handles, C# doesn't seem to have it.
VB: Private Sub NumberButtonClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn0.Click, btn1.Click, btn2.Click, btn3.Click,
So when I click on button 0, 1, 2 etc I would like it to go into the event below.
Want is the method to do this in C#,
Many thanks,
Steve
Code:
private void NumberButton_Click(object sender, System.EventArgs e)
{
txtDisplay =+ ((Button)sender).Text
}