You should create the Random
before the loop.
public static void LoadCards()
{
Deck deck = new Deck();
Random r = new Random();
for (int i = 0; i < 24; i++)
{
YourDeck.Add(deck.CardNames[r.Next(0, 14)]);
}
}
The default constructor of Random
Initializes a new instance of the Random class, using a time-dependent default seed value.
The default seed value is derived from the system clock and has finite resolution. As a result, different Random objects that are created in close succession by a call to the default constructor will have identical default seed values and, therefore, will produce identical sets of random numbers.