title: Deleting Last Item from Array of String
body: <p>I'm working on a simple blackjack game project. Firstly I create the array of cards:</p>
  
  <pre><code>string[] deck = { "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A", };
  </code></pre>
  
  <p>than I multiply it 4 and given <code>deckNumber</code>:</p>
  
  <pre><code>newDeck = Enumerable.Repeat(deck, deckNumber*4).SelectMany(x =&gt; x).ToArray();
  </code></pre>
  
  <p>when I want to delete last card from array I apply this:</p>
  
  <pre><code>newDeck = newDeck.Where(w =&gt; w != newDeck.Last()).ToArray();
  </code></pre>
  
  <p>so the problem is that code doesn't removes last item from array, acts like there are multiple arrays and removes all last elements from them. For example with one deck:</p>
  
  <pre><code>cards: 2 3 4 5 6 7 8 9 10 J Q K A 2 3 4 5 6 7 8 9 10 J Q K A 2 3 4 5 6 7 8 9 10 J Q K A 2 3 4 5 6 7 8 9 10 J Q K A 
  </code></pre>
  
  <p>when I apply my remove command it become:</p>
  
  <pre><code>cards: 2 3 4 5 6 7 8 9 10 J Q K 2 3 4 5 6 7 8 9 10 J Q K 2 3 4 5 6 7 8 9 10 J Q K 2 3 4 5 6 7 8 9 10 J Q K 
  </code></pre>
  
  <p>it removes all the A's from array. But I want to remove only the last item from whole array. Whats the problem how can I solve this?</p>