Supermarket.Inventory.Price C# (CSharp) 메소드

Price() 공개 메소드

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
리턴 float
        public float Price(string product)
        {
            return items[product].Price;
        }