public List<Item> GetItemsBy(ItemMatchDelegate match) { List<Item> rtnList = new List<Item>(); foreach (Item item in this._items) { if (match(item)) rtnList.Add(item); } return rtnList; }
public Item GetItemBy(ItemMatchDelegate match) { Item rtn = null; foreach (Item item in this._items) { if (match(item)) { rtn = item; break; } } return rtn; }