using System.Collections.Generic; namespace Bücherwurm { class Inventory { private List InventoryList {get; set;} private int NextId {get; set;} public Inventory(){ InventoryList = new List(); NextId = 0; } public void Add(Book Book) { InventoryList.Add(new Item(NextId, Book.BookId)); NextId = NextId++; } public void Remove(int Id) { InventoryList.RemoveAll(item => item.ItemId == Id); } } }