示例#1
0
        // methods
        public override bool Equals(object other)
        {
            if (!(other is Buyable))
            {
                return(false);
            }
            Buyable b = (Buyable)other;

            return(prod.Equals(b.prod) && amount == b.amount && leftInStock == b.leftInStock);
        }
示例#2
0
 public Buyable(Buyable other)
 {
     prod        = other.prod;
     amount      = other.amount;
     leftInStock = other.leftInStock;
 }