title: Can I pass a List<myclass> to a button click event?
body: <p>I'd like to add another member to a List (in MainForm) when a button (in formA) is clicked. </p>
  
  <p>I have a class called "Trips" which contains two string members for storing.</p>
  
  <p>I created a List in the MainForm:</p>
  
  <pre><code>List&lt;Trips&gt; alltrip = new List&lt;Trips&gt;() { new Trips("Trip 1", "March"), 
                                            new Trips("Trip 2", "May")};
  </code></pre>
  
  <p>I passed the List to FormA and then I thought that I can use <em>alltrip</em> in the button click event. But it returned an error, saying it couldn't find <em>alltrip</em>, so I tried pass it to the button like the following.</p>
  
  <pre><code>    Trips newTrip = new Trips();
      private void AddTripConfirm_Click(object sender, EventArgs e, List&lt;Trips&gt; alltrip) 
      {　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　//I add the List here
          newTrip.Name = AddTripNametxt.Text;
          newTrip.Time = AddTripTimetxt.Text;
          alltrip.Add(newTrip);
      }
  </code></pre>
  
  <p>So far it looked good for me, but then another error occurred in this line in the Designer.cs:</p>
  
  <pre><code> this.AddTripConfirm.Click += new System.EventHandler(this.AddTripConfirm_Click); 
  </code></pre>
  
  <p>It says that "No overload for 'AddTripConfirm_click' matches delegate 'System.EventHandler.'" As I am quite new to C# I cannot think of any solution and struggled to find a satisfying answer from similar questions. </p>
  
  <p>Please help.
  Thanks a lot. </p>