Exemple #1
0
 public override string ToString()
 {
     string result = "";
     Money total = new Money(0.0, "RON");
     foreach (Product product in products)
     {
         result += product + Environment.NewLine;
         total.Add(product.Price());
     }
     result += "Total price: " + total;
     return result;
 }
Exemple #2
0
 public Product(string name, Money price)
 {
     this.name = name;
     this.price = price;
 }
Exemple #3
0
 public Toy(string name, Money price)
     : base(name, price)
 {
 }