title: Is there any difference between sql linq
body: <p>I have a list of Pieces. I want an int[] of PieceID;</p>
  
  <p>I try this, but this create an anonymous type[].</p>
  
  <pre><code>PiecesTop1 = new List&lt;Piece&gt;();
  
  var test = PiecesTop1.Select(x =&gt; new {x.PieceID}).ToArray();
  </code></pre>
  
  <p>Then I found this syntaxis and works ok.</p>
  
  <pre><code>var lstPieceID = from p in PiecesTop1
                   select p.PieceID;
  
  int[] arrPieceID = lstPieceID.ToArray();
  int i = arrPieceID[0];
  </code></pre>
  
  <p>I usually use first sintaxis so not familiar with second one.</p>
  
  <ul>
  <li><p>First question: How I make first sql to return an int[].</p></li>
  <li><p>Second question: How can I call each of those sql query type to difference beetween them?</p></li>
  <li><p>Is there any diference on what sintaxis should I use (just in case I'm not using any  database).</p></li>
  </ul>