SHARE
TWEET

Untitled

a guest Jun 20th, 2019 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. abstract class Item
  2. {
  3.   public string Name { get; set; }
  4.   public long Quantity { get; set; }
  5.  
  6.   public void IncreaseQuantity(long quantity)
  7.   {
  8.       Quantity += quantity;
  9.   }
  10.      
  11. class Bag
  12. {
  13.   //and here comes my confusion and my choice of how to fit in adding
  14.  //items to bag
  15. //Variant1: When choosing List<Item> and add to bag
  16. //variant2: When choosing Dictionary<string, Item>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top