title: C# Calling on a Class for a to-do list
body: <p>I am asked to write a separate class to do something, so I figured I would do this for a to-do list (use a text box to enter data into a list and then have another list for completed tasks, use a button to transfer between).</p>
  
  <p>I have been able to get data added into my to-do list and my code will successfully remove from the to-do list and place in the "Done" list through clicking a button.</p>
  
  <p>My code doesn't work when I put it in a new class.</p>
  
  <p>Here's the code of the new class:</p>
  
  <pre><code>public class ToDo : Form1
  
      {
          public void Remove()
          {
  
              for (int i = 0; i &lt;= (lstToDo.SelectedItems.Count - 1); i++)
              {
  
                  lstDone.Items.Add(lstToDo.SelectedItems[i]);
                  lstToDo.Items.Remove(lstToDo.SelectedItems[i]);
  
              }
          }
      }
  </code></pre>
  
  <p>and here is the code from Form1 which I think I am attempting to call from when I click on a button:</p>
  
  <pre><code>public void btnRemoveToDo_Click(object sender, EventArgs e)
          {
  
              ToDo todo = new ToDo();
              todo.Remove();
          }
  </code></pre>
  
  <p>Any help?</p>