I have 2 collections that hold the same kind of object. One is an inventory and the other is a list of available items. If the user takes an item, I would like to move the item from the available items to the inventory. I don't want to copy it, I want to move it. How can I do this? Here is a code snippet of how it's setup, but no actual code to do anything, since that's what I'm working on.
I have 2 questions however. The Item objects have an ID member. How can I search for the item by the ID member once it is in one of the collections?
Code:
Public Items as New List(Of Item)
Public Inventory as New List(Of Item)