I have 70 buttons whose names are like button1, button2, button3 and so on. My aim is that whenever button1 is clicked, it will say "1", button2 will say as "2" and so on for the others.
The code for button1 to speak is:
SpeechSynthesizer synthesizer = new SpeechSynthesizer();
private void button1_Click(object sender, EventArgs e)
private void button2_Click(object sender, EventArgs e)
and so on for other 68 buttons.
Now it is difficult to implement the 70 button's actions. These button actions follow a pattern - so can anyone suggest a more efficient way I can implement these button handlers to save me writing out 70 different actions?