public void ShuffleDeck() { var rnd = new Random(); var rndDeck = new CardDeck(); rndDeck.Clear(); while (Deck.Count > 0) { var rndThis = rnd.Next(Deck.Count); rndDeck.Add(Deck[rndThis]); Deck.Remove(Deck[rndThis]); } Deck = rndDeck; }