title: Use LINQ and C# to make a new List from an old List
body: <p>This should be pretty simple, but I am new at LINQ. I have a <code>List&lt;FillStruct&gt;</code> of <code>FillList</code> structs. I'd like to use LINQ to create a new <code>List&lt;NewFillStruct&gt;</code> where instead of having the number of buys and sells, I would have one variable containing the sum. </p>
  
  <p>For example, if the <code>FillStruct</code> structure has </p>
  
  <pre><code>buy = 4 
  </code></pre>
  
  <p>and </p>
  
  <pre><code>sell = 2
  </code></pre>
  
  <p>then the <code>NewFillStruct</code> structure will have </p>
  
  <pre><code>numlong = 2.
  </code></pre>
  
  <p>If the <code>FillStruct</code> structure has </p>
  
  <pre><code>buy = 2 
  </code></pre>
  
  <p>and </p>
  
  <pre><code>sell = 4
  </code></pre>
  
  <p>then the <code>NewFillStruct</code> structure will have </p>
  
  <pre><code>numlong = -2.
  </code></pre>
  
  <p>Here are the structures.</p>
  
  <pre><code>struct FillStruct 
  {
      int buy;
      int sell;
      string date;
  }
  
  struct NewFillStruct
  {
      int numlong;
      string date;
  }
  </code></pre>