title: How can store variable while select query in LINQ?
body: <p>I have a LINQ query like this: </p>
  
  <pre><code>var q = from p in m.TblOzvs.AsEnumerable()
          where (p.OzviyatNumber == txtSearch.Text) 
          select new mylist
          {                     
              Col1 = p.OzviyatNumber.ToString(),
              Col2 = p.Name,
              Col3 = Calculate._RPMajmoSoodeGhest(p.OzviyatNumber)[1],
              Col4 = Calculate._RPMajmoSoodeGhest(p.OzviyatNumber)[0]
          };
  </code></pre>
  
  <p>As you can see, for <code>Col3</code> and <code>Col4</code> I need to call a function that returns an array of strings where <code>string[1]</code> is for <code>Col3</code> and <code>string[0]</code> is for <code>Col4</code>.</p>
  
  <p>I was wondering if there is any way to call <code>Calculate._RPMajmoSoodeGhest()</code> 1 time and use it for both <code>Col3</code> and <code>Col4</code>?</p>