i've been reading a lot about references but i'm not quite sure how to use them. I have form1 that opens form2, form2 gathers data from the user and turn that into an object, i need to send that object back to form1 to make an array of that object. I've been unable to do that simple thing for quite some time today. Thanks in advance!
public Form1()
{
InitializeComponent();
}
In Form2
private void cmdSavePlayer_Click(object sender, EventArgs e)
{
CNode newP = new CNode();
newP.IdPlayer= Convert.ToInt32(txtId.Text);
newP.PlayerName = txtName.Text;
newP.Level = Convert.ToInt32(txtLevel.Text);
newP.TotalScore = Convert.ToInt32(txtScore.Text);
}
Now i need to send that newP back to form1.