示例#1
0
 public void AddItem(string name, string description, bool veggie, double price)
 {
     var menuItem = new MenuItem(name, description, veggie, price);
     if (_numberOfItems >= MaxItem)
         Console.WriteLine("Menu is full.");
     else
     {
         _menuItems[_numberOfItems] = menuItem;
         _numberOfItems++;
     }
 }
示例#2
0
 public void AddItem(string name, string description, bool veggie, double price)
 {
     var menuItem = new MenuItem(name, description, veggie, price);
     _menuItems.Add(menuItem);
 }