I need to make calculator with buttons for each digit and so on. My question is, if there is any way to make one function that will handle with all events for all digits?
Now I have:
private void addDigit(char i)
{
// some calculation with 'i'
}
private void btn7_Click(object sender, EventArgs e)
{
addDigit('7');
}
but I have 10 methods. Is there any other option? To make one method for all with digit as an argument?