Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ItemAddedToTab
- {
- public ItemAddedToTab(
- Guid tabId,
- string menuItem,
- double price
- )
- {
- if(tabId == Guid.Empty) throw ArgumentNullException("The tab id must be provided.");
- if(string.IsNullOrEmtpy(menuItem)) throw new ArgumentNullException("The menu item must be provided.");
- if(price < 0) throw new ArgumentException("Price must be greater or equal to 0.")
- TabId = tabId;
- MenuItem = menuItem;
- Price = price;
- }
- public Guid TabId { get; private set; }
- public string MenuItem { get; private set; }
- public double Price { get; private set; }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement