public override bool Equals(object obj) { Goods g = obj as Goods; return(g != null && g.Name == Name && g.Price == Price); }
/* * public double TotalSum * { * get=> goodPrice * Number; * set => TotalSum=value; * * } */ public OrderItem(String name, double price, int number) { goods = new Goods(name, price); Number = number; }