예제 #1
0
        public Item FetchItem(string id)
        {
            foreach (Item InventoryItem in _inventory)
            {
                if (InventoryItem.AreYou(id) == true)
                {
                    return(InventoryItem);
                }
            }

            return(null);
        }
예제 #2
0
        }//item

        public Item FetchItem(string id)
        {
            foreach (Item InventoryItem in _inventory)

            {
                /* if (InventoryItem.AreYou(id) == true)
                 * {
                 *
                 *  return InventoryItem;
                 * }*/
                if (InventoryItem.AreYou(id) == true)
                {
                    return(InventoryItem);//inventory
                }
            }
            return(null);//null
        }