예제 #1
0
        public override bool Equals(object obj)
        {
            Goods g = obj as Goods;

            return(g != null && g.Name == Name && g.Price == Price);
        }
예제 #2
0
        /*
         * public double TotalSum
         * {
         *  get=> goodPrice * Number;
         *  set => TotalSum=value;
         *
         * }
         */

        public OrderItem(String name, double price, int number)
        {
            goods  = new Goods(name, price);
            Number = number;
        }