public void Refill() //Creates objects to put in to the stacks in the list { for (int i = 0; i < info.ProductList.Count; i++) { switch (i) { case 0: for (int j = 0; j < 8; j++) { info.ProductList[0].Push(snack = new Snack(0)); } break; case 1: for (int j = 0; j < 8; j++) { info.ProductList[1].Push(snack = new Snack(1)); } break; case 2: for (int j = 0; j < 8; j++) { info.ProductList[2].Push(drink = new Drink(0)); } break; case 3: for (int j = 0; j < 8; j++) { info.ProductList[3].Push(drink = new Drink(1)); } break; default: break; } } }