Supermarket.Inventory.Price C# (CSharp) Method

Price() public method

Checks the price per unit for a product by the given name. The Raises an exception if this inventory does not contain the given product.
public Price ( string product ) : float
product string The name of the product to get a price per unit for
return float
        public float Price(string product)
        {
            return items[product].Price;
        }