I am trying to make a ToDo list program that has multiple forms. There is a main form with a listbox that will contain the titles of all the tasks, and a separate form that the user will use to type in the details of the task (title, description, priority, etc) which will be added to the listbox in the other form. However, when I try to add the user's data from the second form into the first using this method:
MainForm.AddToForm(newTask);
I get the problem: 'An object reference is required for the non-static field, method, or property ToDoList.MainForm.AddToForm(string[])
Can someone please direct me as to where I am going wrong?
Aucun commentaire:
Enregistrer un commentaire