This is my method of Adding into storage
private List<Item> itemsInStorage = new List<Item> ();
public void AddItemsToStorage(Item item)
{
if (itemsInStorage.Exists (x => x.ID == item.ID)) {
Debug.Log ("Item Exist Adding To Appropriate Count");
for (int i = 0; i < itemsInStorage.Count; i++) {
if (itemsInStorage [i].ID == item.ID) {
itemsInStorage [i].Count += item.Count;
}
}
} else
{
Debug.Log ("Item Does Not Exist Adding Item");
itemsInStorage.Add (item);
}
}
but i kinda know of the thing i am looking for from the lambda, then there would be no need to do a loop to find that thing again… : - )