Hello. Brilliant forum by the way. Why doesn't this work please?
- public void InitializePack()
- {
- Card [] pack=new Card[52];
- for (int i = 0; i < 4; i++) {
- for (int j = 1; j < 14; j++) {
- pack[(i*13)+j-1] = new Card((Suits)i, (Values)j);
- }
- }
- foreach (Card c in pack)
- Console.WriteLine(c.Name);
- }
I've not included the rest of the code as I thought you'd see this one straight away.
Thanks very much!


Dharmraj ThakurRank #577 · 4.2K reputationPosted Jan 28, 2018, 6:11 PM EST
Arunprasath Gajapathi49 reputationPosted Jan 31, 2018, 7:35 PM EST
Mukesh NayakRank #1,172 · 1.5K reputationPosted Jan 31, 2018, 9:02 PM EST
Nigel Foster11 reputationPosted Jan 31, 2018, 10:19 PM EST