Every time I create a new instance of Player
I want to do the following code
private void button1_Click(object sender, EventArgs e)
{
Player Player1 = new Player();
}
Player class
{
public Player()
{
Form1.AddControls(someControl)
}
}
I can't seem to do anything to do with form1
e.g. textbox1.text = "Test"
. I assume this is a scope issue but I can't find an answer on the internet. Does anyone know how I can access + add controls to my form1
through a class?
Thank you for your time.