static void Main(string[] args) { Product product1 = new Product { Name = "Milk", Price = 2.33m }; //int result = product1.Add(4, 5, ,6 ,6, 4, 4,3, 3, 2,3, 4,23, 34, 3); Product product2 = new Product { Name = "Eggs", Price = 1.33m }; //Console.WriteLine(String.Format("{0}: {1:c} + {2:c} tax", product1.Name, product1.Price, product1.CalculateTax(.08m, 10) )); product1.CalculateTax(); product1.CalculateTax(.08m); product1.CalculateTax(.08m, 10m); Console.ReadLine(); }
static void Main(string[] args) { Product product1 = new Product { Name = "Milk", Price = 5.43m }; Product product2 = new Product { Name = "Eggs", Price = 1.33m }; //Console.WriteLine(string.Format("{0}: {1:c} + {2:c} tax", product1.Name, product1.Price, product1.CalculateTax(0.08m, 10))); product1.CalculateTax(); product1.CalculateTax(0.08m); product1.CalculateTax(0.08m, 1.0m); //pause Console.ReadLine(); }