Code:
public Item GetItemInInventoryByID(uint ID)
{
foreach(var item in this.Inventory)
if(item.ID == ID)
return item;
return null;
}
Why would you use a double loop when you can do it only with one? LINQ will get you more than 1 item, which means you can also count in creating a enumerable<> and adding the items in that list, then return it on which you loop and get the first element?
Why do you even bother using LINQ