public static void TestCars4(Func <string> action) { Console.WriteLine("\nTestCars4"); Console.WriteLine("----------"); Car car2 = new ConvertibleCar(); Car car3 = new Minivan(); car2.ShowDetails(); car3.ShowDetails(); action(); }
public static void TestCars1(Func <string> action) { Console.WriteLine("\nTestCars1"); Console.WriteLine("----------"); Car car1 = new Car(); car1.DescribeCar(); Console.WriteLine("----------"); ConvertibleCar car2 = new ConvertibleCar(); car2.DescribeCar(); Console.WriteLine("----------"); Minivan car3 = new Minivan(); car3.DescribeCar(); Console.WriteLine("----------"); action(); }