I need to run a program in C # that has a MainForm, with a list of customer data and a button to add customer data. In turn if I click on this button, I should open another form where you can enter customer data, click accept and then close the window to return to the MainForm where the list would be updated with the added name.
My problem is that I do the MainForm, I do the other form that opens when I clicked the button, I entered the name and other data, where I create a new client object and I store it but when I close this second window I lose the object and I do not know how to pass it to the MainForm and add it to the list. From the second Form, I do not recognize the list object of the MainForm as to add it there.