title: Passing Lambda selectors as an argument
body: <p>I am working on some reporting code and I have found myself repeating a certain piece of code which contains a where and select cause over and over again?  The only piece of information changing is the target field.</p>
  
  <pre><code>    private static void UpdateResultsListInstructions(List&lt;ManagementInfo&gt; managementInfo, KeyValuePair&lt;int, int&gt; item)
      {
          managementInfo
              .Where(m =&gt; m.YearMonthNo == item.Key)
              .Select(m =&gt; m.VolumeOfInstructionsReceivedInMonth = item.Value)
              .ToList();
      }
  
      private static void UpdateResultsListClaims(List&lt;ManagementInfo&gt; managementInfo, KeyValuePair&lt;int, int&gt; item)
      {
          managementInfo
              .Where(m =&gt; m.YearMonthNo == item.Key)
              .Select(m =&gt; m.VolumeOfClaimsCancelled = item.Value)
              .ToList();
      }
  </code></pre>
  
  <p>Is it possible to pass in the selector as an argument so I can reuse one method?</p>
  
  <p>Along the lines of </p>
  
  <pre><code>UpdateCommonResultsList(managementInfo, item, (m =&gt; m.VolumeOfClaimsCancelled = item.Value))
  </code></pre>
  
  <p>I can probably rejig all the code so that this is not necessary but now that I've had the thought I'd like to see if its possible. Any help appreciated.</p>