void createButtons(Size size, Point location, string text, int increaseX = 0, int increaseY = 0) {
for(int i = 0; i < 10; i++) {
Button btn = new Button();
btn.Text = text;
btn.Location = new Point(location.X + increaseX, location.Y + increaseY);
btn.Size = size;
btnList.Add(btn);
Controls.Add(btn);
}
}
//function overload
void createButtons(Size size, int x, int y, string text, int increaseX = 0, int increaseY = 0) {
createButtons(size, new Point(x, y), text, increaseX, increaseY);
}
//function overload
void createButtons(int w, int y, int x, int y, string text, int increaseX = 0, int increaseY = 0) {
createButtons(new Size(w, y) , new Point(x, y), text, increaseX, increaseY);
}