title: Returning a method not giving same result as returning a variable
body: <p>Suppose :</p>
  
  <pre><code>returnedDeck = player.DoYouHaveAny(value);
  MessageBox(returnDeck.Count);
  </code></pre>
  
  <p>Now, here's the problem. With this method :</p>
  
  <pre><code>public Deck DoYouHaveAny(Value value)
      {
          textBoxOnForm.Text += name + " has " + cards.PullOutValues(value).Count + " " + Card.Plural(value) + Environment.NewLine;
  
          return cards.PullOutValues(value);
      }
  </code></pre>
  
  <p>I will always get returnedDeck.Count = 0</p>
  
  <p>But if I change the method to do that :</p>
  
  <pre><code>public Deck DoYouHaveAny(Value value)
      {
          deckToReturn = cards.PullOutValues(value);
          textBoxOnForm.Text += name + " has " + cards.PullOutValues(value).Count + " " + Card.Plural(value) + Environment.NewLine;
  
          return deckToReturn;
      }
  </code></pre>
  
  <p>Now the returnedDeck.Count will return some values.
  Just pure curiosity, but why can't I use "return cards.PullOutValues(value);" directly ?</p>
  
  <p>Here's the code of PullOutValue :</p>
  
  <pre><code>public Deck PullOutValues(Value value)
      {
          Deck deckToReturn = new Deck(new Card[] { });
          for (int i = deck.Count - 1; i &gt;= 0; i--)
              if (deck[i].Value == value)
                  deckToReturn.Add(Deal(i));
          return deckToReturn;
      }
  </code></pre>