예제 #1
0
 // Add many of one item
 public void Add(InventoryItem inventoryItem, int quantity)
 {
     for (int i = 0; i < quantity; i++)
     {
         inventoryItem.Id = i + _items.Count();
         _items.Add(inventoryItem);
     }
 }
예제 #2
0
 // Add one of one item
 public void Add(InventoryItem inventoryItem)
 {
     inventoryItem.Id = _items.Count();
     _items.Add(inventoryItem);
 }