title: Add reference parameter to RoutedEventHandler
body: <p>How can I add a reference parameter to a RoutedEventHandler method?</p>
  
  <hr>
  
  <p>I know that I can add a parameter with lambda like this:</p>
  
  <pre><code>check.Checked += (s, e) =&gt; Checkbox_Checked(s, e, additionalParameter);
  </code></pre>
  
  <p>However if I want to add a reference to the additional parameter, it says 'Cannot use <code>ref</code> or <code>out</code> parameter inside an anonymous method...'. This makes sense, hence my question, how can I define the function, that I can call it as follows:</p>
  
  <pre><code>check.Checked += Checkbox_Checked(check, new RoutedEventArgs(), ref additionalParameter);
  </code></pre>
  
  <p>The function then has to return <code>RoutedEventHandler</code>, which makes me come to this:</p>
  
  <pre><code>private static RoutedEventHandler Checkbox_Checked(object sender, RoutedEventArgs e, ref List&lt;String&gt; additionalParameter) {
  
          return ??
  }
  </code></pre>
  
  <p>What should I return, or is there a way better way to accomplish this?</p>
  
  <p>@Edit 25-08-2015 - 11:48 </p>
  
  <p>To give some background information;</p>
  
  <p>In the code I create checkboxes on the run, based on a selected item from a combobox. This can generate i.e. 20 checkboxes, which I want to have an eventhandler to add the name of the checkbox to the additionalParameter list.</p>
  
  <p>This way I know later on which checkboxes are checked when I want to do some other actions.</p>
  
  <p>(I am aware that I can also loop through all the checkboxes in the grid and gather the content of those that are checked.)</p>