I am making a program that should just continue if 2 conditions are given.
The first one, 2 TextBoxs have the same word in and a Button wa
TextBox
Button
button1, button2 and button3 have same even handler
private void button1_Click(Object sender, EventArgs e) { Button btnSender = (Button)sender; if (btnSender == button1 || btnSender == button2) { //some code here } else if (btnSender == button3) //some code here }