title: How to "Dequeue" Element from a List?
body: <p>I have a <code>List</code> of cards called _deck:</p>
  <pre><code> private List&lt;String&gt; _deck = new List&lt;String&gt; {&quot;2h&quot;, &quot;3h&quot;, &quot;4h&quot;, ... }
  </code></pre>
  <p>And then I want to remove a card from the <code>List</code> and save into a variable. I'm trying to do:</p>
  <pre><code> String p1FirstCard = _deck.RemoveAt(0);
  </code></pre>
  <p>but I'm getting the error</p>
  <blockquote>
  <p>Cannot convert type void to String</p>
  </blockquote>
  <p>In C# <code>List</code> is there something like push/pop but which does that at the &quot;head&quot; or &quot;start&quot; of the <code>List</code>?  (Push/pop works at the &quot;tail&quot; or &quot;end&quot; of the list.)</p>
  <p>If not, how should I do remove the first element but save it in a variable?</p>