This is dependent on the inventory - rarely will you be calling this directly, as the game has functions for this for the Player, located in Farmer (in the main namespace).
−
if (item.Stack == 0) {
+
−
inventory.Remove(item);
+
To do so, in most situations, just call .removeItemFromInventory(Item)