I am new to C# and I am following this C# tutorial at the moment. In this tutorial I came across the exercise to develop a calculator.
A C# .Net Calculator – Design Stage
In the solution given in the exercise, each digit button was given a btn*_click method which can be generalized pretty easily.

(source: homeandlearn.co.uk)
How can we write the code, so that we can generalize these 10 functions? I though it can be done by modifying initializeComponent(), but comment about it says it should not be modified using code editor.
How can this problem be tackled?
The tutorial you posted is using the visual editor in visual studios. By default the designer will generate code with the convention {controlname}_{eventname} you can explicitly assign a different event name in the properties window, and all the buttons could share the same event method.
And then it looks like you could refactor this like:
I hope that helps.