So I have the following code for when the \"Add player\" button is clicked
private void addPlayerBtn_Click_1(object sender, EventArgs e)
{
//Do some code
For one, when calling a method, you don't declare the type of the parameter, just the value.
So this:
addPlayerBtn_Click_1(object sender, EventArgs e);
Should be
addPlayerBtn_Click_1(sender, e);
Now, you'll have to declare sender and e. These can be actual objects, if you have event args to pass, or:
addPlayerBtn_Click_1(null, EventArgs.Empty);
The above can be used in either WinForms or ASP.NET. In the case of WinForms, you can also call:
addPlayerBtn.PerformClick();