public void ExecuteAction() { if (_cmd == ProductCommandList.Increase) { _productManager.IncreaseCostPerunit(_amt); } else { _productManager.DecreasedCostPerunit(_amt); } }
static void BasicProduct() { var prod = new Product { Name = "My Product", Description = "My product Description", CostPerUnit = 0.10, WeightUnit = 1, Weight = "Heavy" }; var pManager = new ProductManager(prod); pManager.IncreaseCostPerunit(43); pManager.DecreasedCostPerunit(42); // WIll match the changes wrought with the reciever. Console.WriteLine(prod); }