コード例 #1
0
ファイル: Buyable.cs プロジェクト: tomerkeizler/E-Mart
        // 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
ファイル: Buyable.cs プロジェクト: tomerkeizler/E-Mart
 public Buyable(Buyable other)
 {
     prod        = other.prod;
     amount      = other.amount;
     leftInStock = other.leftInStock;
 }